1. While in a conversation yesterday afternoon, I had an idea which tumbled out of my head and onto paper. But before I go any further with this, there's some things I don't understand about Oxide and I was wondering if one of the core Oxide or plugin developers could help me.

    I just want to make one thing clear though - I'm not trying to make a new API. What I'm trying to get to is something much simpler. Please bear with me.

    First a bit of background about me. I used to be a programmer in an easy to use high level language called AS for IBM mainframes, but I haven't done anything like that in over a decade. Since then I've had about 120 PHP plugins and scripts developed for me based on my specifications. So I'm confident when I say I'm good at coming up with simple methods to make things work. Okay? :)

    This is the core of what I'm trying to get to.

    a) - A (Rust or Oxide) plugin checks a directory on a web server every 5 (or n) minutes.
    b) - If there are new XML (or JSON) files in that directory, it opens each one in turn, parses them for pre-specified variables, reads the values and then issues a server command which may include the usage of one of those variables e.g. partial player name or Steam ID.

    That's pretty much it. I realise there could be a fair bit of clever stuff going on in b) that I've glossed over for now.

    Why would anyone want to do this? Some may have already cottoned on to the answer.

    It allows a simple method of controlling a Rust server based on events that happen on a web site WITHOUT anyone having to know how to code with the Oxide API to make this happen. We're not all as technically aware as plugin developers, so if there's any way of admins interfacing with a web site that's a little easier to use than the raw API, I'm all for it. ;-)

    And not all web / PHP developers want to go learn (or use) LUA or C Sharp, but are very capable of creating an XML or JSON file based on events on a web server. It doesn't even have to be those, it could be a TXT or CSV too I guess as the plugin would parse the file looking for a value and a variable.

    Once such a plugin exists (maybe it already does and I don't know) then an admin that's a competent web developer could do things such as:-

    1) - Create a membership site and when players join, they get granted additional permissions on the game server.
    2) - Set up a members web page that allows players to call a heli (Rust) on themselves for fun without requiring an admin's intervention or giving them permissions that you wouldn't want to give to a player.
    3) - Generate broadcast messages based on events that happen on the web server.
    4) - Generate mass air drops based on events that happen on the web server.

    ...and so on.

    Those suggestions are the tip of the iceberg, and I actually have a nice idea for a PHP script myself, but I figured the Oxide plugin if specified and written carefully and correctly could do much more.

    I hope you see what I'm trying to do. I'm trying to make it easier for web developers to trigger events on a game server without having to learn how to write plugins or try to interface with existing plugins. The main reason for me is that plugins are changing all the time and it might be a huge amount of work for a web developer to be maintaining a web site AND custom / proprietary plugins too. But a single well thought out Oxide plugin may only ever need minimal updates once completed.

    I believe that anything that makes Oxide more accessible is a good thing.

    So. The $64,000 question is would any of the plugin developers like to write such a plugin? I guess that ideally it would be one of the core Oxide team, but any dev that is interested and thinks they can do it is fine with me.

    Furthermore, I'm prepared to stump up some cash to get this done. (Shock, horror, amazement.) As you can guess I'm pretty much sold on this as it's my idea and I think it's a good one. For me at least.

    An example XML file might look something like this:-
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <blah>
        <player_name>EvilynCorporated</player_name>
        <command>callheli</command>
    </blah>

    JSON:-
    Code:
    {
      "player_name": EvilynCorporated,
      "command": "callheli"
    }

    CSV:-
    Code:
    "player_name","command"
    "EvilynCorporated","callheli"
    or, I guess:-
    Code:
    "player_name","EvilynCorporated"
    "command","callheli"

    TXT:-
    Code:
    player_name,"EvilynCorporated"
    command,"callheli"
    You get the idea.

    The Oxide plugin config would have to contain web directories to parse, and possible commands to expect or execute based on the player_name alone for example, so no command in the XML file, it's in the plugin config. I need to do some more thought on this before speccing it out, and a conversation with a plugin developer would be ideal just to get things straight.

    Anyone up for it? Or comments? ;-)
     
  2. Wulf

    Wulf Community Admin

    You wouldn't be able to do XML files via plugins, only JSON. The plugins would also only have access to the oxide/data and oxide/config folders.
     
  3. That would all be okay. That's the kind of information on constraints I'm looking for as I don't know yet what Oxide is capable of, so thank you.

    In theory... Would a plugin be able to search for new JSON files and then parse for player name and issue a command to the server in the way I've detailed? Looking at the Oxide API and being familiar with other plugins my guess is yes, but I'd like to hear it from the man himself. (That's you.)
     
  4. Wulf

    Wulf Community Admin

    Search no, but if you knew the name and it was formatted properly you could read it.
     
  5. Damn. Thank you.

    Okay. Thinking some more... I could use a single file and just add to it, and the plugin could read it every few minutes and compare it to what it's already read so it only does the new stuff?
     
  6. Wulf

    Wulf Community Admin

    That would work. If you needed advanced directory searching or other file formats, you could always make an extension that didn't have the sandbox.
     
  7. I'm all for keeping things as simple as possible. THANK YOU for your time, I think I know where I'm going with this now. I'll spend some thoughtful time speccing it out and then see who wants to do it - as I said, I'm quite happy to pay to have this done as I think it will be very useful.

    You wouldn't want to do it would you? ;-)
     
  8. Wulf

    Wulf Community Admin

    Trying to catch up with abandoned plugins before I take on any new ones right now.
     
  9. You would be able to do this just via PHP using an RCON library?
     
  10. In theory, but we've discarded that idea and taken it a few steps further. ;-)
     
  11. It does work :) no need for theory
     
  12. Ah yeah, sorry, I meant if you only want to issue RCON commands. :) We've gone down the extension route to give us a bit more flexibility.
     
  13. Well most plugins come with a commandline counterpart and based on the suggestions you gave, rcon is the way to go for now :D but if you ever feel like doing something gimme a bell, and ill try help you out when i have some time :D