Rimworld Multiplayer
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Tips & Tricks 1. **DnSpy:** View → Options → enable Show hidden compiler generated types and methods. This is useful for seeing details such as the ordinal assigned to a lambda. # Development Environment Setup This document details how to set up a RimWorld Multiplayer development environment. > **Note:** This guide is written for Visual Studio Code in Windows. If you want to use another IDE or OS, YMMV. To build ensure you have .NET 8 or higher installed. ## (Optional) Duplicated game installations If you wish to have the option to play a "pristine" copy of the game, it is best to have a separate copy for development. :::spoiler Windows Instructions 1. Navigate to your `steamapps\common` directory. - If you haven't changed the default library location in Steam this will be: `C:\Program Files (x86)\Steam\steamapps\common` 1. Copy the existing installation directory from `RimWorld` to `RimWorldDev` ::: :::spoiler Mac Instructions 1. Navigate to your `steamapps\common` directory. - If you haven't changed the default library location in Steam this will be: `/Users/[username]/Library/Application Support/Steam/steamapps/common/`. 1. Copy the existing installation directory from `RimWorld` to `RimWorldDev` 1. If Rimworld is not launched through Steam, it cannot connect to the Steam API, and things like workshop mods are unavailable. To resolve this create a file `steam_appid.txt` with contents `294100` in the `/steamapps/common/RimWorldDev` directory, alongside `RimWorldMac.app` ::: > **Note:** You can do this multiple times, for example if you wanted a v1.6 Rimworld and a v1.5 Rimworld to do development in both environments. This way the Steam copy in `RimWorld` is still pristine and can be used for standard play. And you have another copy in `RimWorldDev` that you can develop in. ## (Optional) Separate game settings You may want different settings depending on whether you're playing with friends, or doing development. With friends you likely want high-res, full-screen. During development you might like the game to be in Window mode, as small as possible (1024x768), and with Development mode enabled! These instructions allow you to maintain separate game environments between "pristine" and "dev" 1. The game ships with a README file (`steamapps\common\RimWorld\Readme.txt`) 1. This file details a command-line switch to specify to the game where to store save files _and config_. - **Note:** The file also details a `-quicktest` option to fast-load into a tiny map. :::spoiler Windows instructions - Create a shortcut to the executable (`RimWorldWin64.exe`), and edit the shortcut details. - After the target add the following text: ` -savedatafolder=DevSaveData` - The target should now look like: ![Screenshot of shortcut properties](https://i.imgur.com/y32RP4f.png) - This specifies to save the config and games in a directory named `DevSaveData` in the same folder as the executable, eg `steamapps\common\RimWorldDev\DevSaveData` ::: :::spoiler Mac instructions You can run the file from the command line and specify switches with a command like: ```sh open -na /Users/[username]/Library/Application\ Support/Steam/steamapps/common/RimWorldDev/RimWorldMac.app --args -savedatafolder=DevSaveData ``` And if you're comfortable with Mac/Linux, you can make a shell script out of this easily enough. However many people may want a "shortcut" icon. - Launch Automator - Choose the "Application" type - Add the Action "Library" > "Utilities" > "Run Shell Script" - Set the Shell to `/bin/bash` - Enter the following as your script: ```sh open -na /Users/[username]/Library/Application\ Support/Steam/steamapps/common/RimWorldDev/RimWorldMac.app --args -savedatafolder=DevSaveData ``` - Save this as an Application, eg "RimWorldDev" You can now add the new "Application" to your dock or desktop. ::: ## Clone Multiplayer Mod > **Note:** It's recommended to fork the source code to your own account/repository first, and clone that. 1. Navigate to your local game mods directory (eg `steamapps\common\RimWorldDev\Mods`) 1. Clone your code repository here (eg `RimWorldDev\Mods\Multiplayer`) > **Note:** The build steps assume this relative location and copy binaries accordingly. Otherwise paths will need to be updated and/or binaries moved after each build. > **Note:** While the GitHub [documentation](https://github.com/rwmt/Multiplayer/blob/master/CONTRIBUTORS.md) still refers to `development`, make sure to base your branch off `dev`. - The language files are maintained in a [separate repository](https://github.com/rwmt/Multiplayer-Locale), but are linked to this repo as a "[git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)". - If you are cloning the `Multiplayer` repository for the first time, add the `--recursive` switch to your clone command, eg: ``` git clone --recursive git@github.com:rwmt/Multiplayer.git ``` - If you have already cloned the `Multiplayer` repository, you can fetch the Language files using the following command: ``` git submodule update --init --recursive ``` - Alternatively you can copy the language files manually. Copy the `Languages` folder from an original mod installation (eg `steamapps\workshop\content\294100\2606448745\1.5\Languages`) to your mod folder (`steamapps\common\RimWorldDev\Mods\Multiplayer\Languages`) 1. If you navigate to the `Multiplayer\Source` directory you should be able to build the solution now. The `Source\Client\Multiplayer.csproj` specifies to copy the compiled files back to the Mod directories `Assemblies` and `AssembliesCustom` as a build action. Technically you can edit the code to make changes, build and RimWorld will respect these changes. The next section will detail how to perform debugging. ## Debugging The below instructions only apply to Windows. ### dnSpy This will allow you to inspect and eventually debug vanilla RimWorld code. 1. Install [dnSpyEx](https://github.com/dnSpyEx/dnSpy). ### Doorstop [Rimworld Doorstop](https://github.com/pardeike/Rimworld-Doorstop) allows you to enable the RimWorld Unity debugger. Follow the instructions on their page. Below is a summary. 1. Download the latest [UnityDoorstop Release](https://github.com/NeighTools/UnityDoorstop/releases) (select the release for your platform, eg `doorstop_win_release_4.4.0.zip`) - Unzip and place the files `doorstop_config.ini` and `winhttp.dll` into the __RimWorld__ root directory (not mod directory) 1. Download the latest [Rimworld Doorstop Release](https://github.com/pardeike/Rimworld-Doorstop/releases) (select the `Doorstop.dll`) - Place the `Doorstop.dll` file into the __RimWorld__ root directory (not mod directory) 1. Modify the `doorstop_config.ini` as per the [Rimworld Doorstop instructions](https://github.com/pardeike/Rimworld-Doorstop) - Ensure you update the following settings: ```ini debug_enabled=true debug_address=127.0.0.1:55555 ``` - The port you choose only affects the debugger you are using. Visual Studio will default to port 56000, dnSpy defaults to port 55555. ### Start a debug session 1. Open dnSpy. 1. Select File > Open, and select `\RimWorldWin64_Data\Managed\Assembly-CSharp.dll` 1. Set a breakpoint - For example, Assembly-CSharp > RimWorld > ActiveDropPod > PodOpen 1. From here you have two ways to debug: 1. Launch the game first and connect the debugger - Run the game (`\RimWorldWin64.exe`) - From dnSpy, select Debug > Start Debugging - Debug engine: Unity (Connect) - IP Address: `127.0.0.1` - Port: <whichever port was selected in `doorstop_config.ini` above> > __Hint__: if you are using dnSpy and have the port set to the default 55555, then you don't need to enter any values. Simply select "Unity (Connect)" and click OK/hit enter. 1. Allow dnSpy to launch the game to connect the debugger - From dnSpy, select Debug > Start Debugging - Debug engine: Unity - Executable: `\RimWorldWin64.exe` 1. Load the Multiplayer DLL into dnSpy 1. From dnSpy select Debug > Windows > Modules (this will only be present while connected) - This will list all `.dll` files used by `RimWorld.exe`. 1. Look for `Multiplayer.dll` and open it, but note that it **may not appear right away**. - If you can't find `Multiplayer.dll`, enter "data-" into the search bar - Double-click any module with names like `data-0000022CFEF538E0`. It usually has a version "0.5" - Check the left-side **Assembly Explorer** to see if `Multiplayer.dll` appears there. 1. Play the game! You can run multiple instances of the same `\RimWorldWin64.exe` and connect over LAN. Ensure you trigger an appropriate event for the breakpoint set: ![](https://i.imgur.com/Up2tJ9P.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully