LogoLogo
Back to raftmodding.com
  • Welcome to the RaftModding docs!
  • ⬇️Getting started
    • Installing Raft Mod Loader
      • Troubleshooting
        • An error occured while fetching for updates
          • Disabling IPV6
          • Changing the DNS
        • The menu inside the game doesn't show up
        • The game crashes on startup
        • There are error notifications in-game
      • Linux or Steam Deck installation
        • Using Bottles
        • Using Wine
      • Configuring your antivirus
        • Windows Defender
        • Malwarebytes
        • Bitdefender
        • Avast
        • Norton
        • AVG
    • Installing a mod
      • Mods in multiplayer
    • How to run multiple raft instances
  • ⚙️MODDING TUTORIALS
    • How to create a mod project
      • The modinfo.json file
    • How to create an AssetBundle
    • How to create console commands
    • Harmony basics
    • Getting access to the modding repositories
  • ⚒️Modding API
    • RAPI
    • Mod
  • 📚Modding Examples
    • Accessing the player instance
    • Adding private variables
    • Spawning dropped items
    • Get selected hotbar item
    • Get the current SteamID
    • Get the current username
    • Giving items to a player
    • Modifying private variables
  • 🌏WEBSITE
    • Mod Slugs (Unique Identifier)
  • 🖥️RAFT DEDICATED SERVER
    • Raft Dedicated Server
Powered by GitBook
On this page

Was this helpful?

  1. MODDING TUTORIALS

How to create a mod project

This tutorial is here to guide you through creating a mod project on Raft using RaftModLoader!

PreviousHow to run multiple raft instancesNextThe modinfo.json file

Last updated 1 year ago

Was this helpful?

Let's get started with the requirements! To get started modding you will need the following softwares :‌

  • ​. We highly recommend you to download the 2019 version.

  • . If you have installed simply click .

  • ​. This is the latest available version.

You have to use Unity 2019.3.5f1! Using another version is not supported!

Now that you have the required softwares, let's create your mod project!‌

1) Open the RMLLLauncher and create a mod project by using the mod creator as shown below.‌

2) In the project name text field enter your mod name and hit Create Project! It will then tells you if it has succeeded and opens you the project folder as shown below.‌

3) Now that your mod project is created you can open the .sln file, in the case above i open ExampleMod.sln with Visual Studio. After opening it, open the .cs file as shown below.‌

4) Now that we created our mod project and opened it we can begin creating our mod! As you can see on the screenshot above, there is a lot of green lines, those are comments, read them to know what every line do. Now, let's create a shortcut of our project folder in our mods folder so we won't have to move files or build the mod each time we modify something in our mod. Yeah this is a great feature! 😁

The folder is by default located in Documents\RaftModding\YourProjectName\YourProjectName

Create a shortcut of this folder. Its the folder that contains themodinfo.jsonfile and the.csfile(s). The main folder should also work, but we highly recommend you to create a shortcut of the second one.‌

6) Now, let's start the mod loader, Load our mod and open the console using F10 to see what's happening.‌

Just after loading the mod. The status change to green and says "Running...". Your mod is now running!‌

As you can see when you press F10 it executes the code in the Start() method.‌

7) Now that you know how to write code, to modify your mod information such as its description, its license, the icon, the banner etc simply go in to your mod project files and edit the modinfo.json file as shown below.‌

If you want to know more about this file, how to add an icon, what is the excludedFiles field etc, click below.The modinfo.json file/modding-tutorials/how-to-create-a-mod-project/the-modinfo.json-file‌

And here it is! You made your first mod project! Keep in mind this tutorial is just the requirements & basics! More advanced tutorials are coming soon!

8) Now that you know how to write your mod and how to change its information to build it, simply generate the visual studio project and our build script will automatically pack/build your mod as shown below. The build script will generate a new file named YourModName.rmod This file is the mod file to upload on our and to put in the mods folder.‌

⚙️
site
Visual Studio Community
Unity 2019.3.5f1
UnityHub
here
dnSpy