Skip to content

Latest commit

 

History

History
127 lines (95 loc) · 6.38 KB

CONTRIBUTING.md

File metadata and controls

127 lines (95 loc) · 6.38 KB

Welcome to Oxygen Not Included - Multiplayer Mod contributing guide

Thank you for investing your time in contributing to our project!

In this guide you will get an overview of the contribution workflow from opening an issue, creating a PR, reviewing, and merging the PR.

New contributor guide

To get an overview of the project, read the README. Here are some resources to help you get started with open source contributions:

Getting started

  1. Install Visual Studio 2022
  2. Clone the Oni Multiplayer repository
  3. If you do not have a custom steam library location for Oxygen Not Included skip to step 4
    • Copy/paste the file Directory.Build.props inside the root folder, and rename the copy to Directory.Build.props.user
    • Erase all contents, and fill it in with the following (example for D drive)
<?xml version="1.0" encoding="utf-8"?>
<Project>
    <PropertyGroup>
        <SteamLibraryPath>D:\SteamLibrary</SteamLibraryPath>
    </PropertyGroup>
</Project>
  1. Open the OniMod.sln file inside of the root folder
  2. If you do not have the multiplayer mod subscribe skip to step 6. If you do have it installed you will have 2 entries in game, so lets distinguish them: to the right of solution explorer, go to MultiplayerMod -> mod.yaml
    • Add DEV to the text value end of the Title property
  3. Build solution (keys ctrl+shift+B) or Top bar build -> build solution
    • If you get an error about Unable to find package inside of Microsoft Visual Studio Offline Packages.
      • Right click the solution in the top right
      • Click Manage Nuget
      • Click the gear at the right top
      • Add name: nuget.org, url: https://api.nuget.org/v3/index.json
  4. Start the game trough steam
  5. If you did step 5, then go to mods and make sure you got the DEV version enabled and the subscribed one disabled
  6. Edit your code, and repeat step 6, step 7 and test ingame

Debugging

To debug the mod, you will need two copies of the game on separate steam accounts, and two computers. Download the version of Unity that the game uses via:

You can find the current game version by checking the Player.log file in this folder: %appdata%\..\locallow\klei\Oxygen Not Included

As of writing, the Unity version in use was 2020.3.30f1.

Next, go to the unity installation folder and navigate to:

Editor\Data\PlaybackEngines\windowsstandalonesupport\Variations\win64_development_mono\

From that folder we need three files:

  • WindowsPlayer.exe
  • UnityPlayer.dll
  • WinPixEventRuntime.dll

Copy these to ONI's installation folder, rename WindowsPlayer.exe to OxygenNotIncluded.exe and replace the files. Keep in mind to make a backup of the original files otherwise you would have to verify the game files to retrieve the original ones.

Then, in ONI's installation folder, find OxygenNotIncluded_Data\boot.config and open it with a text editor. Add the following lines:

wait-for-managed-debugger=1
player-connection-debug=1

Now when you start the game via steam it should show a message box saying that you can attach a debugger. Make sure to have the Visual Studio Tools for Unity installed. In VS you can then go to Debug -> Attach Unity Debugger and should be able to attach VS to the game.

Issues

Create a new issue

If you spot a problem with the docs, search if an issue already exists. If a related issue doesn't exist, you can open a new issue using a relevant issue form.

Solve an issue

Scan through our existing issues to find one that interests you. You can narrow down the search using labels as filters.

After you've found an issue that you'd like to tackle - let other know about it. Write down a comment or assign it to yourself.

If you are in doubt feel free to ask questions via comments.

Make Changes

For local development you can use any tool that you prefer. We've tested the project with JetBrains Rider and Visual Studio 2022.

Pull Request

When you're finished with the changes, commit your changes and create a pull request, also known as a PR.

  • Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request.
  • Don't forget to link PR to issue if you are solving one.
  • Enable the checkbox to allow maintainer edits so the branch can be updated for a merge. Once you submit your PR, a maintainer will review your proposal. We may ask questions or request additional information.
  • We may ask for changes to be made before a PR can be merged, either using suggested changes or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch.
  • As you update your PR and apply changes, mark each conversation as resolved.
  • If you run into any merge issues, checkout this git tutorial to help you resolve merge conflicts and other issues.

Your PR is merged!

Once your PR is merged, your contributions will be publicly visible on the Mod repository.