Introduction
This guide will take us through using the best methods of saving progress, the software development workflow envisioned and supported, to publishing and maintaining a mod. It’s about a twenty minute read.
Here’s what you’ll need to do the job; the software and accounts are free
- code.visualstudio.com – https://steamcommunity.com/sharedfiles/filedetails/?id=1507748539 lightweight code editor
- git-scm.com – https://git-scm.com/downloads version control system
- Account on github.com – https://github.com
- https://store.steampowered.com/about/ software distribution platform
- Account on https://store.steampowered.com/
- A sense of curiosity
If you’re reading this, then likely you already have Steam and Rimworld installed, and an account on Steam. Getting the rest in place will probably take around 1/2 an hour. If you get it done in under 15 minutes, then https://www.youtube.com/watch?v=V5M2WZiAy6k
A more in-depth tutorial on how to use the computer’s software install features and create accounts on their websites is https://www.youtube.com/watch?v=dQw4w9WgXcQ
Setup
Visual Studio Code
This editor has an optional built-in improvement over the process of File->Save, even better than auto-save: Always save. What you are seeing is what is stored on disk. Great tech upgrade guys.
Additional XML code completion and error checking, search in store for redhat.vscode-xml
Rimworld XML coloring mod, search in store for madeline.rwxml-lang-serv
Github
This storage facility has an associated issues tracker for handling bugs, feature requests and other issues. Here is github.com – https://github.com/AngleWyrm10/MoreBlueprints/issues/1 resolved over the course of a couple days. I like to think of that example as Baby’s First Issue, because the blame lies outside the mod. This is definitely not the norm.
i.imgur.com – https://i.imgur.com/JEuqImY.jpg
Because in this line of work you’ll have your fill.
It helps to think of bugs as the garbage generated by any production process.
On most bug hunts you are the detective at a crime scene. And you can collect evidence for your wall of clues. With your detective super-power you can tag anything as a clue related to an issue. You can bring to light a trail of evidence that forms a narrative.
It’s so automated that simply mentioning issue #1 is enough to generate a link, and poof: There’s another entry on the detective’s wall of clues.
en.wikiquote.org – https://en.wikiquote.org/w/index.php?title=Blade:_Trinity#Dialogue
Hello, World
Our first goal is to have everything related to the mod stored in one folder, inside
\Steam\steamapps\common\RimWorld\Mods
This will expedite testing the mod on the local machine, saving progress on GitHub and distributing the mod on Steam.
So we create a home for our new mod: ..\Mods\HelloWorld
Let’s start populating our new HelloWorld mod folder. First order of business, tell Git to treat this location as a repository. This will set up an invisible .git folder to hold git-related stuff.
In Visual Studio Code
- File -> close current workspace
- Source Control (3rd button down on the left) -> Open Folder… Mods\HelloWorld
- Source Control -> Initialize Repository
Save the workspace
File -> Save workspace as… Mods\HelloWorld\Hello World.code-workspace
We now have the spark of an idea for a mod: There’s a folder with something in it.
Quick, save it before it melts
We’ll gather our changes, package them up with a label describing them, and push it out to GitHub.
Staging changes involves choosing which changed files go into a Commit package. Most of the time the answer is all changed files. There’s a quick select all button right here:
For the description “Initial commit” is a good choice.
Then click the checkmark above to tie the bundle together as a commit. This is undo-able if I wish to edit.
Publishing a new project to GitHub from within Visual Code editor
First time pushing a commit to GitHub needs a little startup housekeeping to automatically set up the project on GitHub and link to it. Press the cloud button and select publish
From now on, we can just click the “…” button and select Push to send a new commit to GitHub.
Skeleton framework
Next up, the About folder and it’s three files that describe the mod. Below are linked examples of all three that can be copy/pasted and edited. They are commented.
github.com – https://github.com/AngleWyrm10/HelloWorld/blob/master/About/About.xml
github.com – https://github.com/AngleWyrm10/HelloWorld/blob/master/About/Manifest.xml
i.imgur.com – https://i.imgur.com/8m403RY.png
We now have the necessary file setup to qualify as a mod.
Stage a new commit with these changes, call it maybe “Skeleton framework” and push it to GitHub.
Making a Release
In Visual Studio Code:
In ..\About\Manifest.xml, set a new version number.
Stage a commit maybe called “Pre-Release version XXX” and push it to GitHub
Browse to https://github.com/[YOURNAME]/HelloWorld/releases and start a new release
Tag it with the version number, tick the pre-release checkbox and publish it.
After publishing the new release version on GitHub
In Rimworld, switch to developer mode and open the mods manager. Select your mod and click the author’s upload button.
Go to your published items in Steam/Workshop and marvel at your handiwork.
PS: Subscribing to your own mods results in two copies of the mod existing on the local machine, so make sure you want that before subscribing.
Here we come to an end for RimWorld How to Create Mods Guide & Tips hope you enjoy it. If you think we forget something to include or we should make an update to the post let us know via comment, and we will fix it asap! Thanks and have a great day!
- Check All RimWorld Posts List
Leave a Reply