tModLoader Visual Studio Project Template

abluescarab

Empress of Light
Intro
Hello, everyone! It's me again. I thought I would share a pretty simple tool I made for myself: a tModLoader project template for Visual Studio.

Included:
  • Wizard for easy mod creation
  • build.txt
  • description.txt
  • Basic mod file
  • Post-build event to run tModLoaderServer
Download
Check it out with the adf.ly link or directly at the GitHub page.

Installation
Download and extract the latest release. There are two items: tModLoaderWizard.vsix and the tModLoaderTemplate folder. Double-click tModLoaderWizard.vsix and click "Install" when prompted. Then move the tModLoaderTemplate folder into Documents\Visual Studio <version>\Templates\ProjectTemplates.

Modification
To modify the template, just edit whatever file you want to change and restart Visual Studio, then create a new tModLoader project. If you want to add more parameters, check out the parameters page on MSDN.

Modifying the wizard is a little more difficult: just download the source code from the GitHub page, open the solution, and make changes to the "tModLoaderWizard" project. If you didn't change the version number, you'll have to reinstall the .vsix file, so go to Tools > Extensions and Updates... > tModLoader Wizard > Uninstall. Rebuild the solution and double-click the .vsix file in the build directory.
 
Last edited:
Isn't there already a mod template? http://javid.ddns.net/tModLoader/generator/ModSkeletonGenerator.html or is yours different?
Glad you asked! The Skeleton Generator is different in that it gives you a very barebones mod that's not really optimized for Visual Studio. This is a similar yet more in-depth solution for Visual Studio users that lets them create a new project straight in VS with all the "fixings", so to speak. It's also more customizable than the Skeleton Generator, so users can just edit the template files if they make a bunch of mods and want common features between them.

Do I sound like a salesperson yet? :)
 
I just tried this, and it's pretty solid! It might be nice to provide a field with a default for the path to Terraria (mine is not on the C: drive, though it is in a steam app pool), and perhaps prompt for a description?
 
I just tried this, and it's pretty solid! It might be nice to provide a field with a default for the path to Terraria (mine is not on the C: drive, though it is in a steam app pool), and perhaps prompt for a description?
After your feedback, I added a wizard! I didn't get around to implementing everything, but I did add boxes for each setting in build.txt and description.txt. Let me know what you think! Make sure you follow the installation instructions on the GitHub.

(It's ugly, but functional. That's what counts, right? ;))
 
Hey, it worked! That was a good start for me. I was able to work around the issues caused by my non-standard install path without too much trouble, and it actually gave me a mod structure without having to, uh, learn, I guess? Because I'd screw up something in there, anyway. :)

I'll give it another shot at some point, but ... I got my little mod working for myself, so that's cool. It's not releasable at this time, but I'll probably end up publishing something, and this was a big help in getting that to happen.
 
Hey, it worked! That was a good start for me. I was able to work around the issues caused by my non-standard install path without too much trouble, and it actually gave me a mod structure without having to, uh, learn, I guess? Because I'd screw up something in there, anyway. :)

I'll give it another shot at some point, but ... I got my little mod working for myself, so that's cool. It's not releasable at this time, but I'll probably end up publishing something, and this was a big help in getting that to happen.
Glad to hear it! Thanks for using my template! :)
 
Back
Top Bottom