A mod template for "Terraria" that does not depend on a specific PC and is prepared for use in git.
Visual Studio
(Tested withVisual Studio 2019 Community
)tModLoader
(official installation guide) Note: Don't forget to downloadModCompile
via thetModLoader
menu and enable developer mode.
- DON'T open
Visual Studio
now! Project is not ready! - Copy
sample_csproj_user
file and rename it toTemplateTerrariaMod.csproj.user
(this file contains settings specific to each developer's PC, and it is gitignored) and open it. - Change
C:\GOG Games\tModLoader
to the path to the folder wheretModLoader
is installed (tModLoader.exe
andtModLoaderServer.exe
are located in this folder) - Save file and open project in
Visual Studio
Note: these actions should be performed by each developer when downloading the source code for the first time. Keep the original sample_csproj_user
file, it is necessary for new developers.
(Note: In-code name: BestModEver
. Display name: Best mod ever
)
- Rename project in
Solution explorer
to in-code name of your mod. - Open
???.csproj.user
file and changeTemplateTerrariaMod
to the in-code name of your mod. - Open
TemplateMod.cs
file and changeTemplateTerrariaMod
to in-code name of your mod. - Reopen project. Now, project is ready to compile. Next actions is optional.
- Rename
TemplateMod.cs
file andTemplateMod
class to in-code name of your mod. - Open
build.txt
file and add:
author = Authors here
version = Version here. Example: 1.2.3.4
displayName = Display name of your mod here
homepage = Don't add this line if you don't have your own website
- Open
description.txt
file and add description of your mod