Rimworld Mod Development CookiecutterThis is a tool for developers to begin mods more quickly, eliminating the overhead of setting up a new project.
Set up a fully functional mod development environment in 30 seconds or less with a Visual Studio integration!What does it do?
This is a Visual Studio integration (or optionally a command-line, non-VS tool) that, with just 4 skippable questions, will set up an entire Rimworld Mod project for you, including:
- Complete and accurate file structure
- VisualStudio project set up inside the folder structure
- Automatically linked Rimworld .dll files
- Correct initial VS project settings as listed on RW wiki
- Automatic build events on Debug/Release build ensure you always have the most up-to-date and optimized version of your code
- Debug and Release version of mod are automatically maintained and tagged differently
- Start button builds project and launches Rimworld in a resource monitor
- Support for separate save profiles and mod lists in debug mode
Why should I care?
Have you ever written a mod? Do you ever plan to? This takes all the hassle out of setting up the mod, letting you get right to that brilliant idea. Bring the time cost of setting up a project down to 30 seconds! Applicable to modders of the XML/Asset-only variety and C# gurus.
Links
Project Repository and Installation Instructions (https://github.com/n-fisher/cookiecutter-rimworld-mod-development)
This is a pretty neat tool that I wish I had when I started out. While I've now mastered to set up a project by myself, it did make me realise one thing. My current workflow is nowhere near as organised or structured as it should be. Ideally I should have a self-contained lightweight RimWorld install for modding, and a RimWorld install for playing modded. I'm sure there's a command-line option to swap out a modconfig.xml and set a save-data folder...
Do you mind telling me if there's a benefit to the debug and release builds? What's the added advantage over version control like git?
Quote
Do you mind telling me if there's a benefit to the debug and release builds? What's the added advantage over version control like git?
Yeah! I'm a huge believer in open-source projects and would actually argue these should be used alongside VCS (my default being Git)! The way I structure my projects is to have a Git repository in the Debug build (which is the originally generated, non-cloned folder) that captures all of my work commit-by-commit. Then once I have a completely finished update to the mod, I both:
- Push the series of commits and create a Release tag on Github
- Start the solution in Visual Studio in the Release configuration (which both runs the Release mod build tasks and runs Rimworld) and upload that version through the Rimworld editor
This way I can expect to fail on lots of small edits when in the Debug configuration, and once I'm ready to test it like I would upload it (exactly as the user experiences the mod) I change it to Release configuration and play-test the Release version.
Quote from: Mehni on February 12, 2018, 03:22:52 AM
Do you mind telling me if there's a benefit to the debug and release builds?
In addition, the rimworld wiki advocates using Dev and Release builds: http://rimworldwiki.com/wiki/Modding_Tutorials/Distribution#Distribution
So this just follows the standard documented practices, with automation!
This should really be the first thing anyone looks at to make a mod.
Already used it like 10 times for new little mods.
Going to try this thanks for this!
Is there a guide to installing this? The instructions are lacking detail and I can't get it to work.
I tried to make good instructions, what's unclear? :)
Edit: I'm dumb, and this was way easier than I thought.
I do have one question though.
One of the last steps is this:
In the new Solution Explorer view that comes up, right click RimWorldWin and click Set as Startup Project
I don't have a RimWorldWin in the solution viewer after opening my sln file.
Same as Logicsol, can't find it in the solution explorer either, or I'm quite blind :-\ .
Same issue here. Do not see a RimWorldWin to designate as startup project in Solution Explorer. I have tried using cookiecutter from command prompt and within VS2017. Any ideas? Is this still a valid project?
Thanks
You guys will need to look into the settings in VS for your solution and find the option to open an external program for debugging and assign that to the Rimworld executable you use to start the game. I think you may be having this problem because you're using the 64 bit version, or maybe it has something to do with Steam or how the script functions.
The instructions are super specific and the cookiecutter works exactly as advertised, but there are still little things that will need to be worked out. There are a series of videos on youtube published by a user named keen krozzy that are older, kinda long and unedited that go through the manual setup of what this solution does for you, and you might benefit from walking through the steps and looking at the whole process being done and seeing how it was done for you.
This cookiecutter does a heck of a lot more and in a much more efficient manner, but the videos may give a better perspective on some of the details.
Thanks Preechr. I thought of looking to link external after I posted this. Will look up those vids for some more details.
Come to think of it, if you are brand new to VS you will need to install the plugins for cookiecutter and git, and if you haven't used git, you'll need to configure it as your repo, which is not part of this tool's instructions
There are other things you may want to do in addition, like including Harmony and any other frameworks you wish to use, as resources, so paying attention to how that is done and then allowed or included in your mod will be helpful
Hi, new to the scene and I'm having trouble after pip installing cookiecutter, i can't get it to create the environment. I know the instruction were suppose to be super easy, but I must be dumb. Any help appreciated!
EDIT: Nevermind, it seems that I had python installed in my appdata AND in my program files, so when i checked my PATH, it had the program files one but not the local one which pip was installing cookiecutter to (if i had paid attention to the paths Git was showing me i would have know). I uninstalled python and reinstalled it just for my use and it's all good.
For those like me, scratching their heads after installing this cookiecutter in VS and getting only a blank window, don't despair. First, you gotta add the "Data science and analytical applications" package, back on the Visual Studio Installer (and it takes a while to download).
Now, on with the modding using the fancy tool...
How, just, what? I installed it and opened the zip folder and there is a whole bunch of stuff that I have no clue what to do with!
I don't understand the labelling and stuff in there, and the 'readme' is super confusing to me too.
Seriously, just, how?
Supposedly you don't need this 'visual studio' thing, but how do I ensure I'm not using it? What four options buttons are you talking about?
I spent more time fighting the very peculiar environment the cookiecutter sets up than it will ever save me. In the end I found it quicker to set up a solution manually. If you set it up right once, you can even export your project as template and subsequent mods will be ready to go in a few clicks.
The wiki has very detailed instructions on how to set up a solution, and it works well. https://rimworldwiki.com/wiki/Modding_Tutorials/Setting_up_a_solution
It seems i don't have cookiecutter installed, or I am running the command in the wrong location.
C:\>cookiecutter gh:n-fisher/cookiecutter-rimworld-mod-development
'cookiecutter' is not recognized as an internal or external command,
operable program or batch file.
The cookiecutter instuctions are just a link to a GIT solution. How do I install it? Does it need a path entry?
I'm having the same problem. PIP is firing, but apparently cookiecutter is not installed anywhere. I've spent a good half hour googling a solution and have yet to find any
Edit:
1) Had to add cookiecutter to path. This was helpful: https://cookiecutter.readthedocs.io/en/latest/installation.html
2) Visual Studio 2019 had to have the FULL Python workload. IDK why, but it works and I don't want to break it.
Now I have cookiecutter. And all because I just wanted to see if i could get it up. I don't even need it HAHAHHAHA
Quote from: slgray16 on June 10, 2019, 12:23:04 AM
It seems i don't have cookiecutter installed, or I am running the command in the wrong location.
C:\>cookiecutter gh:n-fisher/cookiecutter-rimworld-mod-development
'cookiecutter' is not recognized as an internal or external command,
operable program or batch file.
The cookiecutter instuctions are just a link to a GIT solution. How do I install it? Does it need a path entry?
Yeah it does
For anyone using this for version 1.1, you need to change the .NET Framework version to 4.0.
This can be found in the Project Properties>Application>Target Framework.
I'm trying to use it with Visual Studio 2019. I already have git, python and cookiecutter installer, but when I can't find the template in File>New or in the Visual Studio Installer. Any idea? 😟
I'm still able to create the mod using the console (cookiecutter gh:n-fisher/cookiecutter-rimworld-mod-development), so I'll use that meanwhile :)
.Net framework 4.7.2, surely?
.Net 4.7.2 compatibility package was already installed, but the SDK wasn't.
I've installed the SDK but there is no change.
Can it be use in mac?
This first line of tutorial is giberish for me:
1. cookiecutter gh:n-fisher/cookiecutter-rimworld-mod-development
I have no Cookiecutter in my VS, is it becos I didn't done whatever this thing is saying ?
Hi. Is this Tool available if I use Jetbrains Rider instead of VS? Or at least with VS Code instead of Community?
The line from the tutorial `cookiecutter gh:n-fisher/cookiecutter-rimworld-mod-development` is a command-line command. You may have to install the cookiecutter tool if your system doesn't have it already. If you use the command line to create the frame for your mod, you should be able to open it in VS/VSCode/whatever.
There are a few open issues you should be aware of - you can see them on the github page.
Hey there :),
I am aware that his thread hasn't been active in quite a while, but there is a minor issue that I had with cookiecutter and the github template.
I followed all of the instructions as stated in the github tutorial but, when prompted with "_visual_studio" I keep getting prompted with "Error: Unable to decode to JSON".
I do admit this is the first time I have ever used Cookiecutter, but I tried with some other templates (mainly from the cookiecooker tutorial on github and a few forks from the rimworld github) and they were successfully setup.
Any suggestions or solutions as to how to resolve this JSON issue would be very appreciated :D .
(I attached a picture of the console when just submitting everything as default, showing the error underneath somewhere, it's my first time posting so I don't know how this works :'( )
I might just be dumb but please someone break this down barney style for me. i downloaded git and python but i have no idea how to install the cookie cutter. when i did it through vs it wont recognize the fact that i have python installed. what am i doing wrong?
For anyone that struggled mad hard for this shit im gonna break it down barney style. install virtual studio
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
Then,
Tools > Add Tools and Features
after that make sure you install the python development workflow.
once that is done go to view and hit cookiecutter explorer and bam youre in