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.
Solved Getting started in plugin development?
Discussion in 'Rust Development' started by AnExiledGod, May 25, 2015.
-
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. -
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. -
Wulf Community Admin
-
Calytic Community Admin Community Mod
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. -
Wulf Community Admin
The documentation has and always will be open source: https://github.com/OxideMod/Docs. -
Calytic Community Admin Community Mod
Sure, is the documentation in a github repo or somewhere totally obvious I missed for contributions?
-
Wulf Community Admin
-
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.
-
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? -
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. -
Wulf Community Admin
CraggyIsland is the "dev" map. You can set it using +server.level.
-
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
-
-
/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? -
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. -
-
Kinda barebones, but it's enough for me. -
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. -
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