├── .editorconfig
├── .gitattributes
├── .gitignore
├── About
├── About.xml
├── Preview.png
└── README.md
├── Assemblies
└── README.md
├── Defs
└── README.md
├── LICENSE
├── Languages
├── English
│ ├── DefInjected
│ │ └── README.md
│ └── Keyed
│ │ └── README.md
└── README.md
├── Patches
└── README.md
├── README.md
├── Sounds
└── README.md
├── Source
├── ModTemplate.csproj
└── README.md
└── Textures
└── README.md
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 |
5 | # indent_style = space to use spaces instead of tabs for indentation
6 | indent_style = tab
7 |
8 | # the size of each indent, measured in spaces
9 | indent_size = 4
10 |
11 | # unix style text formatting for best compatibility
12 | charset = utf-8
13 | end_of_line = lf
14 | insert_final_newline = true
15 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | *.jpg binary
5 | *.png binary
6 | *.gif binary
7 | *.dds binary
8 | *.psd binary
9 |
10 | *.in text eol=lf
11 | *.sh text eol=lf
12 |
13 | *.cmd text eol=crlf
14 | *.bat text eol=crlf
15 |
16 | *.cs text eol=lf diff=csharp
17 | *.sln text eol=lf
18 | *.xml text eol=lf
19 | *.txt text eol=lf
20 | *.md text eol=lf diff=markdown
21 | *.csproj text eol=lf
22 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from `dotnet new gitignore`
5 |
6 | # dotenv files
7 | .env
8 |
9 | # User-specific files
10 | *.rsuser
11 | *.suo
12 | *.user
13 | *.userosscache
14 | *.sln.docstates
15 |
16 | # User-specific files (MonoDevelop/Xamarin Studio)
17 | *.userprefs
18 |
19 | # Mono auto generated files
20 | mono_crash.*
21 |
22 | # Build results
23 | [Dd]ebug/
24 | [Dd]ebugPublic/
25 | [Rr]elease/
26 | [Rr]eleases/
27 | x64/
28 | x86/
29 | [Ww][Ii][Nn]32/
30 | [Aa][Rr][Mm]/
31 | [Aa][Rr][Mm]64/
32 | bld/
33 | [Bb]in/
34 | [Oo]bj/
35 | [Ll]og/
36 | [Ll]ogs/
37 |
38 | # Visual Studio 2015/2017 cache/options directory
39 | .vs/
40 | # Uncomment if you have tasks that create the project's static files in wwwroot
41 | #wwwroot/
42 |
43 | # Visual Studio 2017 auto generated files
44 | Generated\ Files/
45 |
46 | # MSTest test Results
47 | [Tt]est[Rr]esult*/
48 | [Bb]uild[Ll]og.*
49 |
50 | # NUnit
51 | *.VisualState.xml
52 | TestResult.xml
53 | nunit-*.xml
54 |
55 | # Build Results of an ATL Project
56 | [Dd]ebugPS/
57 | [Rr]eleasePS/
58 | dlldata.c
59 |
60 | # Benchmark Results
61 | BenchmarkDotNet.Artifacts/
62 |
63 | # .NET
64 | project.lock.json
65 | project.fragment.lock.json
66 | artifacts/
67 |
68 | # Tye
69 | .tye/
70 |
71 | # ASP.NET Scaffolding
72 | ScaffoldingReadMe.txt
73 |
74 | # StyleCop
75 | StyleCopReport.xml
76 |
77 | # Files built by Visual Studio
78 | *_i.c
79 | *_p.c
80 | *_h.h
81 | *.ilk
82 | *.meta
83 | *.obj
84 | *.iobj
85 | *.pch
86 | *.ipdb
87 | *.pgc
88 | *.pgd
89 | *.rsp
90 | *.sbr
91 | *.tlb
92 | *.tli
93 | *.tlh
94 | *.tmp
95 | *.tmp_proj
96 | *_wpftmp.csproj
97 | *.log
98 | *.tlog
99 | *.vspscc
100 | *.vssscc
101 | .builds
102 | *.pidb
103 | *.svclog
104 | *.scc
105 |
106 | # Chutzpah Test files
107 | _Chutzpah*
108 |
109 | # Visual C++ cache files
110 | ipch/
111 | *.aps
112 | *.ncb
113 | *.opendb
114 | *.opensdf
115 | *.sdf
116 | *.cachefile
117 | *.VC.db
118 | *.VC.VC.opendb
119 |
120 | # Visual Studio profiler
121 | *.psess
122 | *.vsp
123 | *.vspx
124 | *.sap
125 |
126 | # Visual Studio Trace Files
127 | *.e2e
128 |
129 | # TFS 2012 Local Workspace
130 | $tf/
131 |
132 | # Guidance Automation Toolkit
133 | *.gpState
134 |
135 | # ReSharper is a .NET coding add-in
136 | _ReSharper*/
137 | *.[Rr]e[Ss]harper
138 | *.DotSettings.user
139 |
140 | # TeamCity is a build add-in
141 | _TeamCity*
142 |
143 | # DotCover is a Code Coverage Tool
144 | *.dotCover
145 |
146 | # AxoCover is a Code Coverage Tool
147 | .axoCover/*
148 | !.axoCover/settings.json
149 |
150 | # Coverlet is a free, cross platform Code Coverage Tool
151 | coverage*.json
152 | coverage*.xml
153 | coverage*.info
154 |
155 | # Visual Studio code coverage results
156 | *.coverage
157 | *.coveragexml
158 |
159 | # NCrunch
160 | _NCrunch_*
161 | .*crunch*.local.xml
162 | nCrunchTemp_*
163 |
164 | # MightyMoose
165 | *.mm.*
166 | AutoTest.Net/
167 |
168 | # Web workbench (sass)
169 | .sass-cache/
170 |
171 | # Installshield output folder
172 | [Ee]xpress/
173 |
174 | # DocProject is a documentation generator add-in
175 | DocProject/buildhelp/
176 | DocProject/Help/*.HxT
177 | DocProject/Help/*.HxC
178 | DocProject/Help/*.hhc
179 | DocProject/Help/*.hhk
180 | DocProject/Help/*.hhp
181 | DocProject/Help/Html2
182 | DocProject/Help/html
183 |
184 | # Click-Once directory
185 | publish/
186 |
187 | # Publish Web Output
188 | *.[Pp]ublish.xml
189 | *.azurePubxml
190 | # Note: Comment the next line if you want to checkin your web deploy settings,
191 | # but database connection strings (with potential passwords) will be unencrypted
192 | *.pubxml
193 | *.publishproj
194 |
195 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
196 | # checkin your Azure Web App publish settings, but sensitive information contained
197 | # in these scripts will be unencrypted
198 | PublishScripts/
199 |
200 | # NuGet Packages
201 | *.nupkg
202 | # NuGet Symbol Packages
203 | *.snupkg
204 | # The packages folder can be ignored because of Package Restore
205 | **/[Pp]ackages/*
206 | # except build/, which is used as an MSBuild target.
207 | !**/[Pp]ackages/build/
208 | # Uncomment if necessary however generally it will be regenerated when needed
209 | #!**/[Pp]ackages/repositories.config
210 | # NuGet v3's project.json files produces more ignorable files
211 | *.nuget.props
212 | *.nuget.targets
213 |
214 | # Microsoft Azure Build Output
215 | csx/
216 | *.build.csdef
217 |
218 | # Microsoft Azure Emulator
219 | ecf/
220 | rcf/
221 |
222 | # Windows Store app package directories and files
223 | AppPackages/
224 | BundleArtifacts/
225 | Package.StoreAssociation.xml
226 | _pkginfo.txt
227 | *.appx
228 | *.appxbundle
229 | *.appxupload
230 |
231 | # Visual Studio cache files
232 | # files ending in .cache can be ignored
233 | *.[Cc]ache
234 | # but keep track of directories ending in .cache
235 | !?*.[Cc]ache/
236 |
237 | # Others
238 | ClientBin/
239 | ~$*
240 | *~
241 | *.dbmdl
242 | *.dbproj.schemaview
243 | *.jfm
244 | *.pfx
245 | *.publishsettings
246 | orleans.codegen.cs
247 |
248 | # Including strong name files can present a security risk
249 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
250 | #*.snk
251 |
252 | # Since there are multiple workflows, uncomment next line to ignore bower_components
253 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
254 | #bower_components/
255 |
256 | # RIA/Silverlight projects
257 | Generated_Code/
258 |
259 | # Backup & report files from converting an old project file
260 | # to a newer Visual Studio version. Backup files are not needed,
261 | # because we have git ;-)
262 | _UpgradeReport_Files/
263 | Backup*/
264 | UpgradeLog*.XML
265 | UpgradeLog*.htm
266 | ServiceFabricBackup/
267 | *.rptproj.bak
268 |
269 | # SQL Server files
270 | *.mdf
271 | *.ldf
272 | *.ndf
273 |
274 | # Business Intelligence projects
275 | *.rdl.data
276 | *.bim.layout
277 | *.bim_*.settings
278 | *.rptproj.rsuser
279 | *- [Bb]ackup.rdl
280 | *- [Bb]ackup ([0-9]).rdl
281 | *- [Bb]ackup ([0-9][0-9]).rdl
282 |
283 | # Microsoft Fakes
284 | FakesAssemblies/
285 |
286 | # GhostDoc plugin setting file
287 | *.GhostDoc.xml
288 |
289 | # Node.js Tools for Visual Studio
290 | .ntvs_analysis.dat
291 | node_modules/
292 |
293 | # Visual Studio 6 build log
294 | *.plg
295 |
296 | # Visual Studio 6 workspace options file
297 | *.opt
298 |
299 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
300 | *.vbw
301 |
302 | # Visual Studio 6 auto-generated project file (contains which files were open etc.)
303 | *.vbp
304 |
305 | # Visual Studio 6 workspace and project file (working project files containing files to include in project)
306 | *.dsw
307 | *.dsp
308 |
309 | # Visual Studio 6 technical files
310 | *.ncb
311 | *.aps
312 |
313 | # Visual Studio LightSwitch build output
314 | **/*.HTMLClient/GeneratedArtifacts
315 | **/*.DesktopClient/GeneratedArtifacts
316 | **/*.DesktopClient/ModelManifest.xml
317 | **/*.Server/GeneratedArtifacts
318 | **/*.Server/ModelManifest.xml
319 | _Pvt_Extensions
320 |
321 | # Paket dependency manager
322 | .paket/paket.exe
323 | paket-files/
324 |
325 | # FAKE - F# Make
326 | .fake/
327 |
328 | # CodeRush personal settings
329 | .cr/personal
330 |
331 | # Python Tools for Visual Studio (PTVS)
332 | __pycache__/
333 | *.pyc
334 |
335 | # Cake - Uncomment if you are using it
336 | # tools/**
337 | # !tools/packages.config
338 |
339 | # Tabs Studio
340 | *.tss
341 |
342 | # Telerik's JustMock configuration file
343 | *.jmconfig
344 |
345 | # BizTalk build output
346 | *.btp.cs
347 | *.btm.cs
348 | *.odx.cs
349 | *.xsd.cs
350 |
351 | # OpenCover UI analysis results
352 | OpenCover/
353 |
354 | # Azure Stream Analytics local run output
355 | ASALocalRun/
356 |
357 | # MSBuild Binary and Structured Log
358 | *.binlog
359 |
360 | # NVidia Nsight GPU debugger configuration file
361 | *.nvuser
362 |
363 | # MFractors (Xamarin productivity tool) working folder
364 | .mfractor/
365 |
366 | # Local History for Visual Studio
367 | .localhistory/
368 |
369 | # Visual Studio History (VSHistory) files
370 | .vshistory/
371 |
372 | # BeatPulse healthcheck temp database
373 | healthchecksdb
374 |
375 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
376 | MigrationBackup/
377 |
378 | # Ionide (cross platform F# VS Code tools) working folder
379 | .ionide/
380 |
381 | # Fody - auto-generated XML schema
382 | FodyWeavers.xsd
383 |
384 | # VS Code files for those working on multiple tools
385 | .vscode/*
386 | !.vscode/settings.json
387 | !.vscode/tasks.json
388 | !.vscode/launch.json
389 | !.vscode/extensions.json
390 | *.code-workspace
391 |
392 | # Local History for Visual Studio Code
393 | .history/
394 |
395 | # Windows Installer files from build outputs
396 | *.cab
397 | *.msi
398 | *.msix
399 | *.msm
400 | *.msp
401 |
402 | # JetBrains Rider
403 | *.sln.iml
404 | .idea/
405 |
406 | ##
407 | ## Visual studio for Mac
408 | ##
409 |
410 |
411 | # globs
412 | Makefile.in
413 | *.userprefs
414 | *.usertasks
415 | config.make
416 | config.status
417 | aclocal.m4
418 | install-sh
419 | autom4te.cache/
420 | *.tar.gz
421 | tarballs/
422 | test-results/
423 |
424 | # Mac bundle stuff
425 | *.dmg
426 | *.app
427 |
428 | # content below from: https://github.com/github/gitignore/blob/main/Global/macOS.gitignore
429 | # General
430 | .DS_Store
431 | .AppleDouble
432 | .LSOverride
433 |
434 | # Icon must end with two \r
435 | Icon
436 |
437 |
438 | # Thumbnails
439 | ._*
440 |
441 | # Files that might appear in the root of a volume
442 | .DocumentRevisions-V100
443 | .fseventsd
444 | .Spotlight-V100
445 | .TemporaryItems
446 | .Trashes
447 | .VolumeIcon.icns
448 | .com.apple.timemachine.donotpresent
449 |
450 | # Directories potentially created on remote AFP share
451 | .AppleDB
452 | .AppleDesktop
453 | Network Trash Folder
454 | Temporary Items
455 | .apdisk
456 |
457 | # content below from: https://github.com/github/gitignore/blob/main/Global/Windows.gitignore
458 | # Windows thumbnail cache files
459 | Thumbs.db
460 | ehthumbs.db
461 | ehthumbs_vista.db
462 |
463 | # Dump file
464 | *.stackdump
465 |
466 | # Folder config file
467 | [Dd]esktop.ini
468 |
469 | # Recycle Bin used on file shares
470 | $RECYCLE.BIN/
471 |
472 | # Windows Installer files
473 | *.cab
474 | *.msi
475 | *.msix
476 | *.msm
477 | *.msp
478 |
479 | # Windows shortcuts
480 | *.lnk
481 |
482 | # Vim temporary swap files
483 | *.swp
484 |
--------------------------------------------------------------------------------
/About/About.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Put a unique mod name here
4 |
5 | put your name here
6 |
7 | authorname.modname
8 |
9 | The description of the mod. Avoid having spaces inbetween text and the description tags at the start and end
10 |
11 |
12 | 1.4
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/About/Preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bbradson/ModTemplate/4e2d0d1ebb66646a171931d778f5b0e3c79ef10b/About/Preview.png
--------------------------------------------------------------------------------
/About/README.md:
--------------------------------------------------------------------------------
1 | The About.xml here contains name, ID, author and other information about the mod. Preview.png is the preview image that gets shown on the workshop and the in-game mod manager. Recommended texture dimensions without black bars are 640x360 or 1280x720. The example file is a duck with incorrect dimensions. File names have to be exact.
--------------------------------------------------------------------------------
/Assemblies/README.md:
--------------------------------------------------------------------------------
1 | dll files go here. This is usually done automatically when building from source files with an IDE like Visual Studio. Do try to verify that nothing not belonging to the mod gets placed here though, like Assembly-CSharp.dll or 0Harmony.dll for example. Duplicate files of this kind can in some cases cause issues.
--------------------------------------------------------------------------------
/Defs/README.md:
--------------------------------------------------------------------------------
1 | Defs go here. Refer to core game files or other mods for examples. File and subfolder names can be chosen freely, the game merges them all together when loading.
2 |
3 | Every file needs at a minimum this, with all its defs wrapped inbetween the two Defs tags:
4 | ```
5 |
6 |
7 |
8 |
9 | ```
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in all
11 | copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 | SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Languages/English/DefInjected/README.md:
--------------------------------------------------------------------------------
1 | Place xml files for translations of def nodes, like label or description, here.
--------------------------------------------------------------------------------
/Languages/English/Keyed/README.md:
--------------------------------------------------------------------------------
1 | Place xml files for language keys to reference using "keyName".Translate() in C# here.
2 |
3 | File contents should have a structure like this:
4 | ```
5 |
6 |
7 | translated text
8 | another example key
9 |
10 | ```
--------------------------------------------------------------------------------
/Languages/README.md:
--------------------------------------------------------------------------------
1 | Translation files go here. When using the Translate() method in C# keys are required for all languages, including english
--------------------------------------------------------------------------------
/Patches/README.md:
--------------------------------------------------------------------------------
1 | Place xml files with xpath patches here. The wiki covers them here: https://rimworldwiki.com/wiki/Modding_Tutorials/PatchOperations
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | RimWorld Mod Template
2 |
3 | All folders except for About are optional and should be deleted when not used. Each folder has readme files and comments with short explanations in every other file. C# development starts in the Source folder.
4 | xml comments look like this:
5 | ```
6 |
7 | ```
8 | Some optional fields are commented out like this. To enable them you remove the surrounding arrows.
9 |
10 | The recommended way for optional mod support is through LoadFolders, which is explained in Tynan's official guide here: https://docs.google.com/document/d/1_DmcLpIvHIQ5AxVLYrn9_iwkOqArlgcWcyE_6RSDG6M
11 |
12 | This template is licensed under MIT and includes a LICENSE file. Remove or replace that file if you wish to publish your mod under a different license.
--------------------------------------------------------------------------------
/Sounds/README.md:
--------------------------------------------------------------------------------
1 | Place sounds here. Supported formats are ogg, mp3 and wav. ogg is recommended. wav is picky with only specific configurations getting loaded correctly.
--------------------------------------------------------------------------------
/Source/ModTemplate.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Put your name here
5 |
6 |
7 |
8 |
9 |
10 | net48
11 |
12 | preview
13 |
14 |
15 | ..\Assemblies\
16 |
17 |
18 |
19 |
20 |
21 | AnyCPU
22 | true
23 | True
24 | preview-recommended
25 | true
26 | portable
27 | prompt
28 | 4
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
--------------------------------------------------------------------------------
/Source/README.md:
--------------------------------------------------------------------------------
1 | This folder does not get loaded by the game. Instead it's here for development of C# mods. ModTemplate.csproj is an xml file that can and should be edited with an xml editor of your choice, or even notepad. Its name is what ends up getting picked as assembly name, unless something else is specified inside. It contains fields like the author name and dependencies too.
2 |
3 | To start developing after setting names for your project, create an empty solution in this folder using an IDE of your choice and add the csproj through the add existing project dialog. Recommended IDEs are JetBrains Rider or Microsoft Visual Studio Community Edition. Both are free. References to RimWorld and Harmony, as well as correct output settings are already set. When installing VS for the first time, pick the .NET desktop development option. Rider does not need any additional packages, but RimWorld centered plugins by gareth parker and zetrith might end up useful.
4 |
5 | When publishing, make sure to not include the auto-generated obj, bin and .vs folders. Those contain large local cache files with contents specific to the computer they were generated on. The Publisher Plus mod provides an in-game dialog to easily exclude folders.
6 |
--------------------------------------------------------------------------------
/Textures/README.md:
--------------------------------------------------------------------------------
1 | Place textures here.
2 | Paths as referenced by defs start inside this folder and have to be unique. All Textures folders essentially get merged when in-game. Supported formats are png, jpg and psd when not using additional mods. dds support gets added by certain mods. Texture dimensions have to be multiples of 4 to not cause issues in-game. Vanilla Expanded uses 128x128p per in-game tile, which is set with the drawSize field in xml. Some prefer higher resolutions like 256p per tile. Even higher resolutions are practically impossible to fully display on modern monitors, even using Camera+, and require unreasonable amounts of VRAM.
3 |
4 | Shortest load times and highest quality is achieved through dds, but png is recommended when just starting out. Rimpy and Rimsort can convert all png files to dds in a way that mods with dds support load correctly, without turning them into a requirement.
5 |
6 | The wiki has a couple tutorials for texture creation.
7 | Oskar Potocki has a youtube channel where he shows his workflow with Adobe Illustrator, here: https://www.youtube.com/@OskarPotockiVE/videos
8 | Affinity Designer, Inkscape and Krita often get recommended too. Don't use paint or gimp.
--------------------------------------------------------------------------------