cookiecutter-rimworld-mod-development
cookiecutter-rimworld-mod-development copied to clipboard
A cookiecutter project that builds the basic Rimworld mod development file structure and build environment.
cookiecutter-rimworld-mod-development
A cookiecutter project that builds the basic Rimworld mod development file structure and sets up a sane build environment.
Table of Contents
-
Install/Setup
-
Windows Command Prompt
- Required Programs
- Usage
-
Microsoft Visual Studio Integration
- Required Programs
- Usage
-
Windows Command Prompt
-
Basic Features
- Folder Structure
- VS Setup Automation
Install/Setup
Windows Command Prompt
Required Programs
- git
- python
-
cookiecutter (or
pip install cookiecutter
)
Usage (inside Rimworld/Mods folder)
-
cookiecutter gh:n-fisher/cookiecutter-rimworld-mod-development
- Follow the prompts, and just press enter to skip the last prompt (
_visual_studio
) - Open the folder you just created and double-click the
ModName.sln
file - In the Solution Explorer pane right click
RimWorldWin
and clickSet as Startup Project
Microsoft Visual Studio Integration
Required Programs
Install (if no File -> New -> From Cookiecutter...
option is available)
- Open up VS Installer (In Visual Studio -> Tools -> Gets Tools and Features)
- Click Modify
- Click Individual Components
- Scroll to Development activities 5a. (VS 2017) Click the Cookiecutter template support checkbox 5b. (VS 2019) Click the Python language support checkbox
- Click Modify
Usage
(Due to a bug in VS, you'll have to make the specific mod's folder in [...]/Rimworld/Mods/ModName
beforehand)
- Open Visual Studio
-
File -> New -> From Cookiecutter...
- Search for
rimworld
- Double-click
n-fisher/cookiecutter-rimworld-mod-development
- Change the Template Options:
-
Create To
=>[...]/Rimworld/Mods/mod_name
-
Mod name
-
Author
(Use your Steam username for automatic linking of mod to profile) (can change later in About.xml) -
Mod Description
(not required, can change later in About.xml) -
Create blank XML files
(yes/no)
-
-
Create and Open Folder
- In the Solution Explorer pane double click your
ModName.sln
file
Basic Features
Folder Structure
This cookiecutter builds the entire standard mod folder structure, with empty folders as the default. namespace_name
is automatically calculated.
- {{cookiecutter.mod_name}}
- About
- About.xml
- Preview.png
- Common
- Assemblies
- Defs
- Languages
- Patches
- Sounds
- Textures
- Source
- Properties
- AssemblyInfo.cs
-
namespace_name
.cs -
namespace_name
.csproj -
namespace_name
.csproj.user
- Properties
-
namespace_name
.sln - LoadFolders.xml
- About
VS Setup Automation
- Links Rimworld and UnityEngine .dlls for importing in code
- Clears the default set debugging and trace constants
- Creates a VS solution with correctly defined paths