Unturned

Unturned

Not enough ratings
Advenced : Modules
By Arthurs
A guide for me to understand what i do and that could maybe help someone else !
   
Award
Favorite
Favorited
Unfavorite
Preparation of the IDE
First, you want to take an IDE, it's basicly something to write down code, and make it run too.
Then you have to do a new solution, go in the .NET section, and click on class library (make sure you selected C#).
It's not finished yet ! Now you want to edit the references... it's basicly a ton of functions and classes for you to use in your code. To find the one you need, no problem, they are in your unturned folder... Just shearch for Assembly-CSharp.dll, Assembly-CSharp-firstpass.dll, and UnityEngine.dll. Then, you have to add them as reference : on your IDE there should be a edit reference button, when you have it, this will open a window, and then, go in the .NET table. There should be a Browse button somewhere, just find it, and add the .dll files you found in the Unturned folders.
Preparation of the Folders
In your unturned directory, next to the app, you should find a Module folder, inside is all Unturneds modules. Now i suggest you to go in the Unturned>Bundles>Source->Exemples folder, and find the Module exemple. I am now going to describe what is inside, i highly recommand you to just copy them and change the informations to make your own.

  • English.dat
    Where there is the name and the description of your module.
  • Icon.png
    The icon of your Module.
  • ModuleName.Module
    A file that tells to the game where are your .dll file(s) and the version of the module.
  • ModuleName.dll
    The " compiled " code of your module.
  • ModuleName.xml
    Bunch of infos about your module, i recommand to just change the name section.
Building
To build your C#, there should be a build or a play button somewere, just press it... nothing is happening, it's normal ! Now you should go in your Project folder, and find a bin folder... inside it, there should be a Debug folder, and inside it, you should find a YourSolutionName.dll file...
DLL files are some peces of code you can add to an application, so you'll just need to put it in your module folder.
Code Exemple
using SDG.Framework.Modules; using SDG.Unturned; using Steamworks; using System; using System.Linq; using System.Reflection; using UnityEngine; namespace UnturnedTestModule { public class TestModule : MonoBehaviour, IModuleNexus { //Is called at the begining of the game's loading public void initialize() { // Is called when a Level is loaded Level.onLevelLoaded += (int levelindex) => { // Desactivate Clouds SDG.Unturned.GraphicsSettings.clouds = false; } }; } //Is called at the end of something (idk what xD) public void shutdown() { } } }
Credits/Infos
Well, first, i'll try to update the guide, but i am busy... So the instructions may have changed...
Big thanks to LeeIzaZombie, who learnt me all of that...
And sorry for the orthography ^^

Update : go here there is more infos : https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=834599848
16 Comments
RoseAssassin_YT 5 Feb, 2017 @ 7:13am 
ok thx
Arthurs  [author] 5 Feb, 2017 @ 7:04am 
those are modules tho, you should start by adding vehicles and objects to the game

RoseAssassin_YT 5 Feb, 2017 @ 7:00am 
thats ok arthurS i am new to the modding community and i wanna learn but thats ok im just glad 2 have friends :D
Arthurs  [author] 5 Feb, 2017 @ 6:52am 
sorry, but right now i dont have the time for this, and i am not very good at this too x)
RoseAssassin_YT 5 Feb, 2017 @ 6:36am 
i dont understand this. can u make a video on it plz. :D
Pierre 13 Jan, 2017 @ 5:22pm 
Ok
Arthurs  [author] 13 Jan, 2017 @ 2:36pm 
visual studio
Pierre 13 Jan, 2017 @ 2:29pm 
OK Windows (10)
Arthurs  [author] 13 Jan, 2017 @ 10:58am 
idk i am on mac x)
Pierre 13 Jan, 2017 @ 10:53am 
Any links for a C#?