We've moved! Join us as we continue development on our new site at umod.org!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  1. You will need Visual Studio 2017 and SteamCMD for this tutorial. This tutorial is here for learning plugin developers like myself, I fortunately had learned this from my development with Rust plugins. Visual Studio is available as a Community version for free, SteamCMD is also free. Visual Studio is essential for Plugin development because it shows your mistakes similar to how spell check works in Word. (IntelliSense)

    Step 1)
    Presuming you already have Visual Studio 2017 installed, (this isn't a tutorial for VS2017 installations) you want to create a new project. To do this, simply open Visual Studio 2017 -> File -> New -> Project. Once you have performed the following steps, you'll have a window popup similar to this: [​IMG]
    If you have a fresh install your window will be a bit different to mine. You want to click "Visual C#" -> "Class Library (.NET Framework)". Name your project whatever you want at the bottom, select / deselect "Create directory for solution" depending on what you want.
    Step 2)
    Install the Hurtworld dedicated server, to do this you want to use SteamCMD. Install SteamCMD from here: SteamCMD - Valve Developer Community. Once you've downloaded SteamCMD, right click the .exe -> "Create shortcut". When the shortcut has been created, right click -> "Properties". Navigate to the "Shortcut" heading at the top of the properties window, edit the "target" box with the following: "D:\Program Files (x86)\SteamCMD\steamcmd.exe" +login anonymous +force_install_dir "D:\MYINSTALLDIRHERE" +app_update 405100 validate +quit". This will get rid of all of those command line commands that some people hate doing, instead you can just sit back and relax whilst its downloading :D. Once it is downloaded, you want to download the latest Oxide version. Oxide for Hurtworld | Oxide a zip containing all of the files needed will be downloaded. Unzip the zip file -> drag the "Hurtworld_Data" folder into your server install directory -> Replace all files.
    Step 3)
    Open back up Visual Studio, or open back up your Solution if you closed it. You want to locate the "Solution Explorer" in Visual Studio, once located you will see something like this: [​IMG]
    As you can see, there is a sub menu named "References", that is the useful sub menu we're going to need to reference our files. Extend that sub menu, you will see several other default references. Select all of the files inside this sub menu other than the "Analyzers" one. Once selected, delete them. After they've been deleted you now want to right click "references" -> "Add reference" -> "Browse" -> Click "Browse" at the bottom right -> Locate to your hurtworld server install from Step 2, locate to the "\Hurtworld_Data\Managed" folder inside of your server install -> Select all files (CTRL + A) -> Deselect "mscorlib.dll" and "System.Core.dll" (CTRL + Click file) -> Click "Add" -> Click OK in Visual Studio. Now, your references sub menu should look like this: [​IMG]
    You can now click the little arrow to close this sub menu.
    Step 4)
    To create a plugin, either edit your Class.cs with examples provided by Oxide API for Hurtworld or right click your Solution name at the top -> click "Add" -> then click "New Item" -> Inside "Visual C# Items" select "Class" -> Name your class whatever you want -> Then click "Add". As a tip, it's useful having a template for oxide plugins, to do this I advise you to research / google "Visual Studio 2017 templates" it is a lot easier working from a base template with plugin development instead of copying a base from one of your existing plugins, then deleting stuff you don't need etc.

    If you need any help feel free to ask me in the thread, however if you're being awkward and showing signs of you not reading this whole tutorial prior, I will NOT want to reply to you whatsoever. Have a nice day, and good look with your future plugin creations! :D