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 StarryPy - A plugin driven server wrapper written in Python.

Discussion in 'Multiplayer' started by Carrots Are Mediocre, Jan 29, 2014.

  1. teihoo

    teihoo Ketchup Robot

    I still haven't pulled it to the main repo, there's some stuff IRL that's taking my time, i need to take an hour or two to go through everything again, check some minor things.

    Edit: And oh for PVP, i'll see if I could build a packet that would send /pvp to server, but might be a bit problematic unsetting it after, so not sure rly.
     
  2. NuRRi

    NuRRi Starship Captain

    Thx teihoo would be great,
    Something like claim but just for PVP would be awesome.
    /planetpvp to set pvp on this planet to true. Again would deactive it.

    I really dont know if this is possible or you just will do a /pvp on every gamer who joins this planet than.
    But since there is not such an option either in the game nor in starrypy this would be really great.

    THX
     
  3. Brockway

    Brockway Pangalactic Porcupine

    An idea :

    /ping

    Pretty self explanatory... With a limit to 1 ping by 5s for avoiding spam maybe.
     
  4. lygcolinwang

    lygcolinwang Scruffy Nerf-Herder

    hi,teihoo!so wonderful work u have done. i damma love it!:giggle:
    by the way.i wanna know where is the player data,plz:cry:
    im try to find it out for a week.looooooool
     
    teihoo likes this.
  5. teihoo

    teihoo Ketchup Robot

    Player data is in player.db and some data like bookmarks is in separate json files named like uuid.json

    Edit: theres sqlite db browser tool if you google it. Can edit player.db
     
    Last edited: Apr 9, 2014
  6. lygcolinwang

    lygcolinwang Scruffy Nerf-Herder

    THX for your patience to teach,teihoo!
     
  7. StarxStone

    StarxStone Void-Bound Voyager

    ok I did the whole wrap step by step and triple checked it and yet when i run the wrap it keeps saying json.config contains invalid json... AHHHH!!!
     
  8. Wingfighter

    Wingfighter Guest

    Is your syntax correct? Refer to www.json.org
     
  9. StarxStone

    StarxStone Void-Bound Voyager

    uhhhh that doesnt really help me it just defines a JSON thats not the problem the problem is ive tried every which way on my virtual computer server and it keeps saying the same error i stated above
     
  10. Wingfighter

    Wingfighter Guest

    Well, read what it says, if it says invalid json, your json has to be wrong, so check if you wrote it correctly e.g. check the syntax
     
  11. StarxStone

    StarxStone Void-Bound Voyager

    it came straight from the download. All i did is change the directory to fit where my Starbound config was thats literally it
     
  12. FuzzyThor

    FuzzyThor Existential Complex

    What os you using windows or linux?
    If windows you need to use \\ like C:\\starbound\\location
    You need to paste your json file to a listener to scan for any errors and it should show you the errors.

    If there is an error. The error msg clearly says to run it against a json listener like at http://jsonlint.com/ this is the info it gives you.
     
    Last edited: Apr 10, 2014
  13. StarxStone

    StarxStone Void-Bound Voyager

    yeah thats what its telling me
     
  14. StarxStone

    StarxStone Void-Bound Voyager

    ill try it out a little later thank you
     
  15. teihoo

    teihoo Ketchup Robot

    Sorry for the late reply, was on a business trip for 2 days. Well FuzzyThor is right. Use jsonlint and it will tell you where the error is. If it was just the path you changed, then you're probably missing some comma at the end or didnt format the path correctly. For windows use with forward slash (/) or double backslash (\\):

    "starbound_path": "c:/Program Files (x86)/Steam/steamapps/common/Starbound/",
    or
    "starbound_path": "c:\\Program Files (x86)\\Steam\\steamapps\\common\\Starbound\\",
     
  16. danks_

    danks_ Existential Complex

    hey teihoo, do you think it would be possible to store the information on a MySQL database instead of player.db?
    c:
     
  17. SoV - Frosty

    SoV - Frosty Void-Bound Voyager

    Regarding the list_players command, you say we can use SQL like commands on it but could you go into a bit more detail?

    Wildcard searches work great but how would I go around to listing only players that have a certain rank. Or how can I list everybody (to avoid the "there are X more results, please use *bla bla bla* to narrow it down" or something like that)?

    I tried:
    /list_players where rank='guest'

    But it returned no results
     
  18. Brockway

    Brockway Pangalactic Porcupine

    Hi teihoo, Danks asking that for compatibility purpose with his CMS, but it's great too for multiple servers using the same database :)
     
  19. danks_

    danks_ Existential Complex

    It's not only for CMS compatibility + extra features, you see, the .db file the wrapper uses can be opened by a notepad or any text editor, meaning that it's not safe, maybe right now there isn't anything important to store, but who knows what plugin will be added later on. That also means that if someone gained access to the computer, you could have people not only stealing the JSON file with the whitelist account's passwords, but also the UUIDS of every player, that means, anyone with access to the player.db has access to admin commands such as /promote, /item , /kick and /ban.

    I'd personally look into maybe writing small plugins, mostly for personal use, but the current .db structure is not only weak, it's also unsafe, meaning that there's no actual point to making one.

    I'm not asking for this MySQL feature because of a CMS, I honestly think it would not only set a better safety standard, it would also set a new bar for wrappers and functions to come, both from enthusiast coders such as teihoo and maybe even the game developers. JSON sorted whitelist accounts, please, let's get rid of that.

    Please lets also take in account SoV - Frosty's comment:
    Having a well structured MySQL database would allow not only the making of in-game commands to be more comprehensible, but also the making of plugins and external features.

    Having a MySQL over SQLite is not only the thing I find weak about the current data storing system, it's also the structure, I think it could be a lot better.
     
    Last edited: Apr 12, 2014
  20. teihoo

    teihoo Ketchup Robot

    I guess different DB could be used and since StarryPy 1.x uses SQLalchemy that one supports MySQL from version 0.9x so I guess it might be fairly easy to do.
    The database was structured on the fly during development (as it looks to me) so yes it would need a better design also. I will have a look what can be done - but I'll keep it optional for ppl who dont want to mess with MySQL, can still use SQLite.
     
    danks_ likes this.

Share This Page