Ludeon Forums

RimWorld => Mods => Tools => Topic started by: fyarn on February 10, 2018, 11:58:52 PM

Title: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: fyarn on February 10, 2018, 11:58:52 PM
Rimworld Mod Development Cookiecutter

This 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:

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)

Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Mehni on February 12, 2018, 03:22:52 AM
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?
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: fyarn on February 12, 2018, 03:33:04 AM
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:
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.
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: fyarn on February 12, 2018, 04:21:23 AM
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!
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Uuugggg on March 17, 2018, 02:37:13 PM
This should really be the first thing anyone looks at to make a mod.

Already used it like 10 times for new little mods.
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Wargrave on March 17, 2018, 09:27:02 PM
Going to try this thanks for this!
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: MockMicrobe on May 09, 2018, 10:58:11 AM
Is there a guide to installing this? The instructions are lacking detail and I can't get it to work.
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: fyarn on May 26, 2018, 12:09:50 AM
I tried to make good instructions, what's unclear? :)
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Logicsol on September 02, 2018, 08:27:28 PM
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.
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Sayuri on September 07, 2018, 01:45:00 PM
Same as Logicsol, can't find it in the solution explorer either, or I'm quite blind  :-\ .
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Shaggy on November 26, 2018, 03:35:24 PM
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
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Preechr on November 27, 2018, 11:09:05 AM
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.
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Shaggy on November 27, 2018, 11:28:22 AM
Thanks Preechr. I thought of looking to link external after I posted this. Will look up those vids for some more details.
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Preechr on November 27, 2018, 05:39:56 PM
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
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: TaryTrayTwins412 on December 14, 2018, 09:07:18 PM
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.
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: jptrrs on February 10, 2019, 08:58:24 PM
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...
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: redxlaser15 on April 11, 2019, 01:22:11 PM
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?
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Mehni on April 12, 2019, 03:46:14 AM
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
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: 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?
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: WinnieTheJinping on October 07, 2019, 05:53:23 AM
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
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: WinnieTheJinping on October 07, 2019, 12:15:17 PM
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
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Chanka on March 02, 2020, 02:20:10 AM
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.
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Marvolath on April 07, 2020, 08:08:59 AM
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 :)
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: LWM on April 07, 2020, 10:13:19 AM
.Net framework 4.7.2, surely?
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Marvolath on April 07, 2020, 12:15:00 PM
.Net 4.7.2 compatibility package was already installed, but the SDK wasn't.
I've installed the SDK but there is no change.
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: VoidRose on June 27, 2020, 01:00:21 PM
Can it be use in mac?
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Rexow on July 02, 2020, 07:51:30 AM
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 ?
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: superhot on July 11, 2020, 09:02:47 AM
Hi. Is this Tool available if I use Jetbrains Rider instead of VS? Or at least with VS Code instead of Community?
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: LWM on July 12, 2020, 12:38:37 PM
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.
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: Missilenight on July 21, 2021, 05:45:07 PM
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  :'( )
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: howgoesit7315 on October 06, 2021, 04:25:34 AM
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?
Title: Re: [Tool] cookiecutter-rimworld-mod-development : Build a Mod In 30 Seconds or Less
Post by: howgoesit7315 on October 06, 2021, 04:58:55 AM
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