1. 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
  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

[WIP] Ugly OSX dedicated server launcher

Discussion in 'Server Help' started by trelawney, Feb 23, 2012.

  1. trelawney

    trelawney KAG Guard Tester

    Messages:
    771
    http://dl.dropbox.com/u/23114384/kag/osx_dedicated.zip , made possible with the fabulous Platypus wrapper. It's essentially a shell script with a fancy icon and launcher. Enjoy, but:
    READ THE FOLLOWING CAREFULLY BEFORE PROCEEDING TO RUN IT.

    What the script does:
    1)Replaces faulty Info.plist with a fixed one that doesn't complain when arguments are passed to the KAG binary (therefore spawning various pop-ups)
    2)Launches KAG with the default server arguments, namely nolauncher autostart Scripts/dedicated_autostart.gm autoconfig Scripts/dedicated_autoconfig.gm
    3) Places Shadlington upside-down on your dock for the duration of the server uptime.

    A few things to note here (What the script does not do):
    a) It presupposes you have KAG installed in /Applications (i think that should be the default for most users)
    b) You have to manually edit dedicated_autoconfig.gm PRIOR to launching - follow the instructions in http://kagwiki.com/wiki/Server#dedicated_autoconfig.gm for server customisation, files are identical across Operating Systems. The default location should be /Applications/KAG.app/Contents/MacOS/Base/Scripts/dedicated_autoconfig.gm.

    You have two ways of doing this , i) using Finder, go to Applications, locate KAG , right click on it and Select 'Show Package Contents' > Contents > MacOS > Base > Scripts > Right click on dedicated_autoconfig.gm , Open With... and select your favourite text editor , ii) open Terminal.app (use Finder to locate it if you don't have it handy), and paste
    Code:
     open -t /Applications/KAG.app/Contents/MacOS/Base/Scripts/dedicated_autoconfig.gm
    ,that should take care of it. Make your changes, save and then launch dedicated from any location.
    c) I haven't tried launching BOTH client and server. I guess having two instances of KAG running separately should work.
    d) Don't be alarmed by the request for administrative privileges , it's merely there to allow copying Info.plist to the protected /Applications location.

    Help Wanted: As you can see, automating configuration editing would halve the amount of instructions in this post, and streamline the launcher. If you're comfortable with Apple Script and can figure out a way of launching TextEdit and on exit proceed with server launch, please say so in the comments or PM me.

    Made possible, thanks to the observations here and there . Why Ugly? Cause KAG in OSX does not offer an officially supported dedicated server solution. Disclaimer follows cause we've seen a lot of legalistic rubbish recently:

    THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TRELAWNEY OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     
    kl4060, FG, BlueLuigi and 6 others like this.
  2. Zephon

    Zephon Shipwright

    Messages:
    14
    Ugh, I didn't noticed this thread until now... I don't know if your dedicated server is up to the task with the newest Build, but I tried it and as long I am not loading any mapcycle cfg with it (edited in dedicated_autoconfig.cfg) it starts up fine but without specific Gamemode Maps (Zombie Fortress generated Maps for example).

    I can see my server in the server list and connect to it through it. But others can't, especially not with the "Connect To..." Option. Tried it with almost all Gamemodes, just for hoping to hit a certain spot to see through it. Maybe I missed something. Edit: I missed something, got the Mapcycle to work. Didn't fixed the Joining of other players though.

    This is the current log:
    http://cl.ly/1q3l1p3s0u0Q3S070a1q

    And here is my current dedicated_autoconfig file:
    http://cl.ly/3S1s310S1x1c2h0b0s1G

    But, in any way, thanks for the work you did so far. Someday hopefully there will be a fully functional Dedicated Server vor OSX
     
  3. trelawney

    trelawney KAG Guard Tester

    Messages:
    771
    Sounds like a port-forwarding issue. Make sure you've opened the correct ports. And to answer your first question, I kinda gave up on the project since there was no interest (you're the first person that replied about a month later :D). That said, it should work on the latest version since all it does is execute KAG in nolauncher mode (getting rid of annoying popups along the way).
     
  4. Zephon

    Zephon Shipwright

    Messages:
    14
    I forwarded my ports already, but after fixing the mapcycle and configuring the OSX Firewall for KAG it worked. I could join, others could join, in all necessary gamemodes. The only thing that doesn't work for the hoster/admin playing on the server is day and night cycle. All local players, joining from another machine are experiencing it, but I am the only one who doesn't. A bit odd, but this probaly has nothing to do with OSX or your dedicated server.

    Edit: I think it is better to join the server with a copy of the KAG App, instead of launching and joining a dedicated server with the same Application. It probaly fixed the day & night cycle for me. Everything plays smoothly now. In conclusion: I'm glad I stumbled upon your dedicated Server. Now I am awaiting the official Zombie Fortress Multiplayer release.
     
  5. XDHardy

    XDHardy Catapult Fodder

    Messages:
    2
    Trelawney are you still working on this project?
     
  6. Shrimp

    Shrimp Bison Rider

    Messages:
    18
    You have my heart felt thanks for creating this server launcher.
    I do have one question though, is KAG meant to launch by itself following the launch of the server?
     
  7. trelawney

    trelawney KAG Guard Tester

    Messages:
    771
    No, the dedicated server will run on its own platypus window. You have to launch a separate KAG if you also want to play afformentioned server.
    Not really. I promise to have a look at it later and check its compatibility with latest KAG.
     
    kl4060 likes this.
  8. Shrimp

    Shrimp Bison Rider

    Messages:
    18
    OK because it appears that when I launch the Server KAG seems to attempt to launch itself and I can not launch the game, But I shan't bother you with further errors and such it is after all a "WIP"
     
  9. trelawney

    trelawney KAG Guard Tester

    Messages:
    771
    Just make a second copy of KAG under Applications and rename to KAG2 or whatever, it should work alongside the dedicated server.
     
  10. Shrimp

    Shrimp Bison Rider

    Messages:
    18
    Cool, I shall attempt that soon, thanks for the advice
     
  11. brreed93

    brreed93 Catapult Fodder

    Messages:
    17
    is there a way i could use server commands from dedicated? i cant figure out how to login to rcon
    </br>--- merged: Aug 20, 2012 4:59 AM ---</br>
    figured it out :p
     
  12. kl4060

    kl4060 Haxor

    Messages:
    313
    froze like this
    (did all editing)

    Copying fixed Info.plist...
    Starting KAG Dedicated...
    Make sure to edit dedicated_autoconfig.gm
     
  13. brreed93

    brreed93 Catapult Fodder

    Messages:
    17
  14. kl4060

    kl4060 Haxor

    Messages:
    313