1. I'm wanting to start creating some plugins and there doesn't seem to be a lot of information on it, or at least, not much I can find.

    So I have a few questions.

    1. Where can I find plugin development tutorials and information?
    2. How do I get things like an Entity List from Rust?
    3. How do I know what kind of data is in a hook like OnPlayerDisconnect, what data is stored in the BasePlayer player?
    4. What language is the best to develop a plugin in and why? I know Javascript, but I can learn any of them as need be.
     
  2. 1. You don't as they don't exist, the best you can do is look at current plugins and http://docs.oxidemod.org/
    2. Decompile the rust dlls with a tool like Justdecompile to figure out the methods rust uses and then just call them in your plugin.
    3. Hook methods are http://docs.oxidemod.org/ and you'll need to use a tool like Justdecompile to decompile the rust dlls.
    4. C# will give the best performance and allow for pretty much anything you want related to the server as you don't have to do workarounds like in other langs.
     
  3. Awesome, thanks for the reply.

    It's disappointing there is no real information on plugin development, perhaps I'll write something up after I've been working on it for a while.

    I thought someone said doing something with the rust files, but I couldn't remember what it was. Seems all of the stuff I want to do I'm going to have to decompile the DLL's and learn it that way.

    Thanks for the answer, I'm really surprised there isn't more information on plugins, and that there aren't more plugins overall. Rust doesn't seem too much further away than Minecraft was modding wise, so I'd figure there would be a flood of plugins.
     
  4. Wulf

    Wulf Community Admin

    There are hundreds of plugins, each are an example of ways to do things. The Docs we provide are basic and incomplete right now, but combined with the Oxide source and Rust DLL, you have all you really need. There are numerous threads around the forums on how to do various things, and if you get stuck, feel free to ask. ;)
     
  5. Calytic

    Calytic Community Admin Community Mod

    Whoa, I wouldn't quite say that! Oxide is really awesome of a number of fronts but unless I do everything in C# then there are significant gaps in my knowledge. The workarounds needed for other languages are not really documented and require thorough research of plugins past and present. The barrier for entry isn't super high but it leaves much to be desired.

    You guys are doing great work and I imagine the documentation will catch up with time. I understand its hard to document something that is in constant flux. Let me throw my hat in the ring and say that if you give us a means to modify the documentation I would be happy to commit some technical writing about my recent exposure to JS, C#, and LUA through Oxide.

    I just started learning Oxide and the Rust Core last month and have written 3 custom mods already and customized over a dozen others (in code using all 4 languages). Frankly if it weren't for my prior coding experience, I would be at a total loss when it comes to major bugs and/or exploits across multiple mods that are unmaintained or have slow updates. I'm not knocking the community, simply saying that just picking random mods from the repository and hoping for the best can be disastrous right now. This should also be looked at heavily.
     
  6. Wulf

    Wulf Community Admin

    It's hard to document methods, functions, etc for every game we support, especially when they often change multiple times a month. You're welcome to contribute though. All of what Oxide provides is documented, either in the source in the GitHub repo, or through examples on the Docs.

    The documentation has and always will be open source: https://github.com/OxideMod/Docs.
     
  7. Calytic

    Calytic Community Admin Community Mod

    Sure, is the documentation in a github repo or somewhere totally obvious I missed for contributions?
     
  8. Wulf

    Wulf Community Admin

    See above edit. ;)
     
  9. Calytic

    Calytic Community Admin Community Mod

    Let me also add for AnExiledGod, Even as a developer who primarily codes JS (for web), knowing JS isn't nearly enough, this is really a C# project through and through, so expect to be familiarizing yourself with C#/.NET DLLs in addition to the Oxide/Rust APIs.
     
  10. I know this thread is as old as the Earth itself but it falls under the same topic;
    ---
    Anyone knows the seed for a "development map"?
    I'm thinking I don't need to load a big map full of ores, and trees, and animals when ... I won't really need any of that to develop (unless, ofc, if I'm developing something that interacts with those entities)

    Or have I missed some configuration flag that tells the server to not spawn any of those things?
     
  11. There is no trigger for that. I think the Rust devs have a development map but I don't believe it is accessible to us.

    Why would you not want all of those things? If you want you can generate a 2000 map size to get a smaller map which will be faster to load if your worried about load times and lag.
     
  12. Wulf

    Wulf Community Admin

    CraggyIsland is the "dev" map. You can set it using +server.level.
     
  13. Because I'm self-hosting the thing for development, instead of having it hosted;
    I'm also thinking the load time needed to load everything in-house and then run the game on top of it would be gigantic - so, if I can lower those two (RC + a dev map) I can avoid using a client to test the code AND I have a low load-time for those reloads/restarts of debugging :)

    Thanks Wulf! You've been a life-saver :)
     
  14. Just so you know, you can reload oxide plugins with oxide.reload * to reload all plugins or oxide.reload pluginname in the console to reload plugins live. Restarting the server to see plugin changes is rarely necessary.
     
  15. I am programming plugins in Python. I want to make sure I'm looking at the correct .dll files. As of now, I am in the following directory:
    /RustDedicated_Data/Managed

    The DLL I see other Oxide plugins importing classes/objects from the most (I'm assuming) is the "Assembly-CSharp.dll", is this the main DLL? Just want to make sure...

    Also, does anyone know where I would copy the "Assembly-CSharp.dll" into, in order to use with my IDE so I can actually make sure I'm getting all the syntax correct for the various objects/classes e.g. "BasePlayer"? Is this even possible? I've never utilized another programming language DLL in tandem with Python.

    Are there any Python programmers out there on Oxide that could give some pointers? I see an IronPython.dll file in the same "Managed" directory, should I be utilizing this DLL?
     
  16. Yes, that's the main DLL.
    It's probably possible to get auto complete for the types in that DLL with Python, but I don't do that, so I don't know. You'd probably have to look for autocomplete related to IronPython.
    The IronPython DLL is just the extension DLL for IronPython, it isn't relevant for you.
     
  17. I see, thank you sqroot. What do you do if you do not use auto-complete for the DLL? Have you just memorized it all? If you have, mad props to you.
     
  18. I haven't. I'm running SublimeText2 without plugins and an ILSpy window with a Reflexil mod when writing plugins.
    Kinda barebones, but it's enough for me.
     
  19. Is "ILSpy" just a decompiler? Not familiar with it nor Reflexil. I think as I'm programming in Python, I can download the IronPython interpreter and that should do the trick...this whole game primarily runs around the .NET framework yes? Hence the ubiquity of C# mods right?

    I've never stepped out of the Python bounds so many other languages and "frameworks" and how they function are extremely unfamiliar to me. As I'm slowly beginning to deduce all the intricacies of programming plugins for Rust/Oxide I'm creating a step-by-step tutorial for others who are fresh off the boat. Are there ways to create stickies or wiki pages for such things on the Oxide site? I've seen a lot of threads created posting the same general questions, but not a dedicated one for such matters.
     
  20. .NET is just the C# (CLR) runtime and a bunch of libraries. Oxide allows you to use a subset of .NET.
    I think the best way to improve documentation is not to have a bunch of stickies, but to improve the doc.
    I've made a small waypoint here, maybe that helps as well: Classes | Oxide