Skip to content

Arty3/My-Unturned-Plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

✨ My Unturned Plugins ✨

Collection of most of my Unturned Plugins

📝 Overview

This repository contains the majority of my finished Unturned plugins. They're all in one repo to avoid having like 50 repos for unturned plugins.
Unturned is an old .NET Unity Engine game from 2014 (still active today), the game has two main plugin frameworks, RocketMod and OpenMod. OpenMod being the successor to RocketMod.
While OpenMod improves on RocketMod on virtually everything, the plugins here are all still RocketMod, because most servers still use RocketMod.

⚠️ Disclaimer

Not all plugins have been uploaded yet!

Please note that the plugins aren't actively maintained.
Nelson (the developer behind unturned) has put tons of efforts into backwards compatibility,
so there's a good chance they'll still work, but please don't be surprised if they don't anymore.

Some plugins are very old. So my conventions might not always be the same, though generally they should be.

🌐 External Resources

For learning resources, see the learning section

📂 Directory structure

The repository is structured as follows:

docs/
├──Plugin_1/
│   └── Docs.md
├──Plugin_2/
│   └── Docs.md
Plugins/
├── Plugin_1/
│   ├── src/
│   │   ├── source_1.cs
│   │   └── source_2.cs
│   └── bin/
│       └── Plugin_1.dll
└── Plugin_2/
    ├── src/
    │   ├── source_1.cs
    │   └── source_2.cs
    └── bin/
        └── Plugin_2.dll

Where the docs folder contains all the documentation on the given plugin.
Each plugin has a given src directory with the source code,
and a bin directory for the compiled plugin.

🛠️ Plugins

💭 Conventions

Commands' arguments are specified using the following syntax:

/command <arg1> <arg2>

Optional arguments will have a question mark infront of them:

/command ?<arg>

Further expanding on this, options for an argument are separated as follows:

/command <option1?option2?option3>

Some older plugins might specify the expected argument type:

/command <arg:bool>

If all the remaining arguments are optional, you might see something like:

/command ? <arg1> <arg2> <arg3>

So don't be scared if you see something like:

/command <arg1:int> ? <option1?option2:bool> <arg3>

📚 Learning Resources

Unturned development has a serious lack of learning resources. This makes it much harder for newer developers to get started making plugins and/or mods.

Below I listed some useful learning resources:

Unturned is made on the unity engine using MONO. This means that it runs on the .NET framework in C#. To get started invest in learning C# and the .NET framework. On windows, you can start developing using Visual Studio.
When starting to develop plugins, I strongly recommend you learn to decompile the game yourself. Most of your time spent developing you will be looking for methods and properties. While the Unturned Datamining repository is a good start, it can be beneficial to do this process yourself. I also recommend you learn OpenMod instead of RocketMod, it's much better and provides detailed API documentation.
There is a good chance that for some more complicated plugins you will need to modify the game's internal logic, for this I recommend using HarmonyLib, which allows you to patch the game's internal code.
Combining this with reflection you can further extend this functionality.
Plugins are all serversided, when working on the clientside you need to create something called a module. This is an API within unturned which allows you to create your own custom modules, which can also be supported on the serverside (e.g. RocketMod and OpenMod are both modules). Please do note that because the game runs using the Battleye Anticheat, custom modules will not run with the anticheat enabled.
When working on a plugin which stores data beyond the server's runtime, you will need a database. The most commonly used database in this context is MariaDB/MySql. Its simple and effective for this scope. For example, when working on a basic kits plugin, you could store all the kit data in the plugin's config xml file. This is ineffective and not very portable, so a common and better implementation is to use a database. You can find the MySql library for C# using NuGet (the C# .NET package manager).

📃 License

This project uses the GNU GENERAL PUBLIC LICENSE v3.0 license
For more info, please find the LICENSE file here: License

About

Collection of most of my Unturned Plugins

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages