Starting up with a resolution of 1920x1080 (fullscreen: True) Renderer: NVIDIA GeForce GTX 960 (ID=0x1401) GfxDevice: creating device client threaded=1 Great tutorial but I have an issue with step 11. I have seen people thinking it's too complex to set up and then waste days trying to recover something, which could be solved in minutes if they had used git. It makes life a whole lot easier if something breaks and it used to work because you can both revert and you can use the log to see what you changed when it broke. Both should work, though Klei said that there are differences, though they haven't said what those differences are.Īlso I highly recommend using git to keep track of your source code. Note that I installed in mods\local while the guide mentions mods\dev. The latter part is for config files and txt guides for config files. It will create the mod dir, copy the DLL file and any. IF EXIST "$(TargetDir)*.txt" ( copy "$(TargetDir)*.txt" "%HOMEPATH%\Documents\Klei\OxygenNotIncluded\mods\local\$(ProjectName)" ) IF EXIST "$(TargetDir)*.json" ( copy "$(TargetDir)*.json" "%HOMEPATH%\Documents\Klei\OxygenNotIncluded\mods\local\$(ProjectName)" ) Mkdir "%HOMEPATH%\Documents\Klei\OxygenNotIncluded\mods\local\$(ProjectName)"Ĭopy "$(TargetPath)" "%HOMEPATH%\Documents\Klei\OxygenNotIncluded\mods\local\$(ProjectName)" In MSVC, I opened project properties and under build events, I entered: Click 'Add' to add your new mod, fill in the required details, and then publish!Ĭheck your Workshop items, and you should find your mod listed there and ready for use. dll is still in use, and you try to upload it, the upload will fail. Make sure that you have exited ONI and the process has ended first! If you mod. Step 13: Once the uploader is installed, open it up. Step 12: When your mod is ready to be uploaded to the Steam Workshop, download and install the ONI Uploader (found under 'Library/Tools' on Steam) In this case, no error messages are listed, and 'Hello World!' was printed into the log. Success! Step 11: Check the ONI log file (stored under '\AppData\LocalLow\Klei\Oxygen Not Included') to make sure the mod was loaded successfully. Your mod should be listed at the bottom of the mod menu with the name of the folder that holds your mod. dll ('HelloWorld.dll' in this case) into a new folder under '\Klei\OxygenNotIncluded\mods\dev' Step 8: The output of the solution build will be listed in your mod directory, under '\bin\Debug' by default. Copy and paste the mod. If the build was successful, there should be no errors listed Step 7: When your done coding, build the solution. You can find more information on how to use Harmony here ONI (like many Unity games) is modded by patching the code with Harmony. Step 6: Now you can finally write your code! This simple example just gets the ONI log file to write 'Hello World!'. dll files into a new folder to keep them with the rest of my mod development files dll files under '\steamapps\common\OxygenNotIncluded\OxygenNotIncluded_Data\Managed' dll files to see their code using a program such as dnSpy). ![]() '0Harmony.dll', 'UnityEngine.dll', '', 'Assembly-CSharp-firstpass.dll' and 'Assembly-CSharp.dll' will cover most peoples needs (you can peek into these. dll file references that you will need for coding your mod. Right click on 'References' and 'Add Reference' ![]() ![]() Step 4: Now go over to the 'Solution Explorer' on the right side of the work space. Once the necessary files are installed (it's quite large from memory), go back to Step 2 On the new menu that opens, select '.NET desktop development' and then 'Modify'. Step 3: If 'Class Library (.NET Framework)' was not listed as an option in the previous step, click on 'Open Visual Studio Installer' instead. Choose a name for your mod folder and a location to save this folder. If you don't see 'Class Library (.NET Framework)' listed as an option, go to Step 3. Double check that your under '.NET Framework 3.5'! This is the version that ONI uses. Step 2: From the menu that opens, select '.NET Framework 3.5' from the drop down menu, and then 'Class Library (.NET Framework)' from the list of options. Step 1: Start up Visual Studio and create a new project Sorry Mac and Linux users! The process will be much the same, but you will probably need to use a different IDE If you run into trouble with your mod code, either make a post on this subforum, or pop into the modding channel on the ONI Discordįor this tutorial I will be using MS Visual Studio 2017 under Windows 10. Please note that this tutorial does NOT cover any coding! That's all up to you. This tutorial is intended to give you a basic overview of how to create a new mod for ONI, get it running, and then upload it to the Steam Workshop.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |