1. GreenCactus

    GreenCactus Naked Wanderer

    Greetings all!

    I was wondering how to set up a build environment for Oxide in Rust. I've looked at the API, but I'm not certain.

    My guess is the following, but correct me if I'm wrong:

    1.) Download Oxide.
    2.) Configure an Oxide localhost server.
    3.) Create a new project in Visual Studio
    4.) Create a file, say, willThisWork.cs
    5.) Copy and paste this basic template (from the API):

    namespace Oxide.Plugins
    {
    [Info("EpicStuff", "Unknown", 0.1)]
    [Description("Makes epic stuff happen")]

    class EpicStuff : RustPlugin
    {
    // The rest of the code and magic
    }
    }

    6. Within the class of epicStuff, try an output hook function. Something like a hello world. Maybe something like this within the class:
    void Init()
    {
    Puts("Init works!");
    }

    7. Load willThisWork.cs into some plugin folder.

    8. Upon loading the Oxide server, would this plugin output to console?

    But would that output to the console, or would it output globally?

    Would these steps work? Or is there a better approach?

    Thanks!
     
  2. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    "Puts" is a logging method in Oxide that will output to your server's console and log file(s).
     
    GreenCactus likes this.
  3. GreenCactus

    GreenCactus Naked Wanderer

    That's good to know.

    But are these basically the general steps? Or am I missing a step?
     
  4. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Those would be the basic steps, yes. You can go further to setup a full project solution in Visual Studio, link folders, etc. if you wanted to as well.
     
    GreenCactus likes this.
  5. Togoshige

    Togoshige Shack Builder

  6. Wulf

    Wulf Community Admin Community Admin Oxide Developer

    Lots of guides around the net on how to setup Visual Studio projects. ;)

    There are a few on the forums with specifics to Oxide too I believe.