1. I recently wanted to start developing plugins for oxide and was wondering if there are any tutorials for a basic plugin and setup just to see how everything works (I did try searching, but I found it difficult to know what to search for, everything I found would be about setting up rust oxide servers not a development environment). I'm not very familiar with csharp or visual studios and couldn't figure out how to.
    • Add libraries such as the ones used in Oxide/Rust
    • Suggest methods and variables of objects (Which probably has to do with the fact I haven't imported any libraries)
    • Compile. I tried using csc on a basic cs file, but it was complaining about a lack of files.
    The errors in the case it's not due to missing libraries
    Code:
    Microsoft (R) Visual C# Compiler version 1.1.0.51204
    Copyright (C) Microsoft Corporation. All rights reserved.TestPlugin.cs(5,13): error CS0234: The type or namespace name 'Core' does not exist in the namespace 'Oxide' (are you missing an assembly reference?)
    TestPlugin.cs(6,13): error CS0234: The type or namespace name 'Core' does not exist in the namespace 'Oxide' (are you missing an assembly reference?)
    TestPlugin.cs(7,13): error CS0234: The type or namespace name 'Core' does not exist in the namespace 'Oxide' (are you missing an assembly reference?)
    TestPlugin.cs(14,31): error CS0246: The type or namespace name 'RustPlugin' could not be found (are you missing a using directive or an assembly reference?)
    TestPlugin.cs(12,6): error CS0246: The type or namespace name 'Info' could not be found (are you missing a using directive or an assembly reference?)
    TestPlugin.cs(12,48): error CS0246: The type or namespace name 'ResourceId' could not be found (are you missing a using directive or an assembly reference?)
    TestPlugin.cs(13,6): error CS0592: Attribute 'AssemblyDescription' is not valid on this declaration type. It is only valid on 'assembly' declarations.
    TestPlugin.cs(16,28): error CS0246: The type or namespace name 'BaseProjectile' could not be found (are you missing a using directive or an assembly reference?)
    TestPlugin.cs(16,59): error CS0246: The type or namespace name 'BasePlayer' could not be found (are you missing a using directive or an assembly reference?)
    TestPlugin.cs(16,78): error CS0246: The type or namespace name 'ItemModProjectile' could not be found (are you missing a using directive or an assembly reference?)
    TestPlugin.cs(16,108): error CS0246: The type or namespace name 'ProtoBuf' could not be found (are you missing a using directive or an assembly reference?)
    TestPlugin.cs(21,32): error CS0246: The type or namespace name 'BaseProjectile' could not be found (are you missing a using directive or an assembly reference?)
    TestPlugin.cs(21,63): error CS0246: The type or namespace name 'BasePlayer' could not be found (are you missing a using directive or an assembly reference?)
    TestPlugin.cs(21,82): error CS0246: The type or namespace name 'ItemModProjectile' could not be found (are you missing a using directive or an assembly reference?)
    TestPlugin.cs(21,112): error CS0246: The type or namespace name 'ProtoBuf' could not be found (are you missing a using directive or an assembly reference?)C:\Users\derek\Desktop\Rust Server\steamapps\common\rust_dedicated\RustDedicated_Data\Plugins>
    
    Any help would be greatly appreciated.
     
  2. Wulf

    Wulf Community Admin

  3. I see that the references are added for the server compiler at the top of the file like this.
    Code:
    // Reference: Oxide.Ext.Rust
    // Reference: Newtonsoft.Json
    I also found that in Visual Studios if you go to Project -> Add Reference... you can add a reference there, but I'm unable to figure out where to obtain the references to add.
     
  4. Wulf

    Wulf Community Admin

    Those are not needed generally. What you need is the Add Reference in Visual Studio. The DLLs are included with your Oxide download.