1. When making a thread, please tag your thread accordingly using the menu to the left of the textfield where you name your thread where applicable. Server Advertisements and Mod Releases should be contained to their respective subforums.

Server Discussion CommandStar: Real-Time Chat, Online Players, and Server Status

Discussion in 'Multiplayer' started by Seriallos, Dec 15, 2013.

  1. MajorCyto

    MajorCyto Phantasmal Quasar

    Hmm, im curious since your going through coffee server im not to sure what we can do here. But is it possible to pull the server stats and place it under the chat, such as ram usage and uptime?
     
  2. greglgomez

    greglgomez Scruffy Nerf-Herder

    Hey, just wondering if you could post the structure and conventions you need to use with yaml, it doesn't seem to be finding my directories.. If you could post an example that would be great!
     
  3. Seriallos

    Seriallos Space Penguin Leader

    It's probably possible to do in a cross-platform way but not high up on my list right now. My current focus is to make CommandStar as useful as possible for players and I'm looking at future features like real-time player location information, shared notes about planets, and things like that. I think the other folks in this forum working on the admin management tools are going to handle that stuff better than me anyway :)

    But, I will keep it in mind!
     
  4. Seriallos

    Seriallos Space Penguin Leader

    The default.yaml has examples for Linux and Windows. You may need to surround the directories in double quotes to get it to work. If you've still having issues with your configs, post some of them in this thread or send me a PM and I'll see if I can help out.
     
  5. Mechrior

    Mechrior Scruffy Nerf-Herder

    getting an error thrown when trying to run the bat file

    npm error.jpg
     
  6. greglgomez

    greglgomez Scruffy Nerf-Herder

    Hi there Seriallos,

    Here are my details..

    hostname.yaml:
    Code:
    serverName: The Starbound Collective
    
    listenPort: 8080
    
    starbound:
      binPath: /home/starbound/server/linux32
      assetsPath: /home/starbound/server/assets
      dataPath: /home/starbound/server/linux32/universe
      logFile: /home/starbound/server/linux32/starbound_server.log
      configFile: /home/starbound/server/linux32/starbound.config
    error message:
    Code:
    [root@barium commandstar]# ./runServer.sh
    npm WARN package.json @ No repository field.
    npm WARN package.json node-hipchat@0.2.0 'repositories' (plural) Not supported.
    npm WARN package.json Please pick one as the 'repository' field
      info  - socket.io started
    restify listening on port http://0.0.0.0:8080
    { message: 'Unable to read config file: Error: ENOENT, open \'/opt/starbound/bin/starbound.config\'',
      cause:
      { [Error: ENOENT, open '/opt/starbound/bin/starbound.config']
        errno: 34,
        code: 'ENOENT',
        path: '/opt/starbound/bin/starbound.config' } }
    [root@barium commandstar]# 
    Edit: I get exactly the same error if I put my directory paths in double quotes.
     
  7. Seriallos

    Seriallos Space Penguin Leader

    The file should be named according to the hostname of your machine, not literally 'hostname'. Looking at your command prompt, I would bet you want to rename the file 'barium.yaml'. Right now, it's just using default.yaml which doesn't work for where you have starbound installed.
     
  8. Seriallos

    Seriallos Space Penguin Leader

    Where did you extract commandstar? It looks like it's trying to run from within System32 which doesn't look right. Are you running it from the Start menu or a desktop shortcut or something like that?

    Try running the BAT file from the commandstar directory and see if that works.
     
  9. NakashimaKun

    NakashimaKun Pangalactic Porcupine

    Okay,

    I've been using this script alongside another one and I've actually got this other (Hard-coded) to how I like it I was wondering if some of the features I've used on it could be added to this and be set with the default.yaml to display certain information.

    So list of my features I'd like to see added.

    Option in default.yaml to make a box appear in the server list to say if server is password protected or not with settings like
    PasswordOn= "1" //On
    PasswordOn= "0" //Off

    Second Feature. A way for the script to work out how many slots are allocated on the server and how many are in use so you can roughly see the usage so if you have max slots of 25 and only 4 people on it should looks something like

    Max Players:
    4 / 25

    These are just the basic things I'd love to see implimented instead of having to hard code them into the page (I hope people agree with me :D )
     
  10. bkg

    bkg Subatomic Cosmonaut

    Can you make that we can see what Users in what Sektor are at the moment ?
     
  11. Mechrior

    Mechrior Scruffy Nerf-Herder

    C:\Users\*redacted*\Downloads\Starbound\server\commandstar-0.1.2 is the working directory it is installed to and they error message is from the .bat file included

    contents of directory portion of default.yaml

    starbound:
    binPath: "F:\Steam Games\steamapps\common\Starbound\win32"
    assetsPath: "F:\Steam Games\steamapps\common\Starbound\assets"
    dataPath: "F:\Steam Games\steamapps\common\Starbound\universe"
    logFile: "F:\Steam Games\steamapps\common\Starbound\starbound_server.log"
    configFile: "F:\Steam Games\steamapps\common\Starbound\starbound.config"
     
  12. shibdib

    shibdib Starship Captain

    Keeping an eye on this. But for now not using as the bloat doesn't seem worth the features that other scripts offer (with less bloat)
     
  13. mocksol

    mocksol Intergalactic Tourist


    Wow awesome I am going to try this. I have been having all kinds of performance issues with my VPS, seems to starting chugging/consuming all ram after its been running for awhile of heavy play. So you just copied the assests folder there and replaced it with a symlink? Does this mean the starbound assets load into RAM everytime the server boots?

    @Seriallos Thanks for your work on this server info page! A nice feature would be a section to list notable systems, put a description of whats there, and maybe the last visited time.
     
  14. greglgomez

    greglgomez Scruffy Nerf-Herder

    Got it working Seriallos, thanks for the help. Running like a charm! :) to update it do I just run "git clone" again? Or is there a update command?
     
  15. Seriallos

    Seriallos Space Penguin Leader

    I'll take a look at these. Should be pretty straightforward since I'm parsing the starbound.config already and other JSON files are super easy to parse if they are in a standard location.
     
  16. Seriallos

    Seriallos Space Penguin Leader

    My buddy is working on cracking that. It looks like the clientcontext binary files in the universe/ directory contain this information. Someone else has figured out the format so we're close to a prototype of being able to watch this file and act on it. The main problem we're facing is that it identifies users by their UUID and I don't currently know of a way to map player name from the server log to the UUID. Hopefully this gets included in the log or we find some other way to map that data.
     
  17. Seriallos

    Seriallos Space Penguin Leader

    Out of curiosity, what kind of bloat do you mean? I'm trying to keep the installation and code pretty lean. I don't intend for this to be a full server management tool as other folks are building far better tools for that purpose than I am.
     
  18. Seriallos

    Seriallos Space Penguin Leader

    Definitely on my list of ideas right now. With the system tracking I put in last night I'm definitely closer to being able to implement this. The next infrastructural step is to build some simple persistence to make sure that notes like this are saved permanently and don't go away on a process restart (right now all chat and system information is just stored in memory and lost if the process is restarted or from a crash - most of it can be re-read from the log easily enough but that doesn't help when the log rotates).
     
  19. Seriallos

    Seriallos Space Penguin Leader

    So I was just able to reproduce this by running the BAT as Administrator - I've been running it as my own local user. Looks like that sets your current directory to C:\Windows\system32\

    Out of curiosity, did you run into a reason that you needed to run it as Admin? Did your normal user not work? I _think_ it should work as a normal user but I haven't tested it much.

    Anyway, I've fixed runServer.bat in the master branch of the repo. If you want to hack it into place for now until a future, stable update, plop this into runServer.bat:

    Code:
    cd %~dp0
    
    @IF EXIST "%~dp0\npm" (
      call "%~dp0\npm" install
    ) ELSE (
      call npm install
    )
    
    @IF EXIST "%~dp0\node.exe" (
      "%~dp0\node.exe"  "%~dp0\node_modules\coffee-script\bin\coffee" server.coffee
    ) ELSE (
      node  "%~dp0\node_modules\coffee-script\bin\coffee" server.coffee
    )
    PAUSE
    
     
  20. Seriallos

    Seriallos Space Penguin Leader

    To get the very latest and greatest (but beware, I might break things):

    Code:
    cd commandstar
    git pull
    
    Assuming you're setup with GitHub keys, this will grab the very latest version of the code that I've pushed. There are fancy things you can do to set your codebase to a specific version by using tags. This Stack Exchange question answers the basics about switching to a tag

    For example, here are the current tags as of right now:

    Code:
    $ git tag -l
    v0.1.0-alpha
    v0.1.1
    v0.1.2
    
    Be aware that this will overwrite any files you have changed that were already in the repo. So if you modify default.yaml or an existing CSS file, this has a good chance of changing those files back to the original state.
     

Share This Page