Skip to content

Library Compiling

Lion8cake edited this page Apr 29, 2025 · 6 revisions

When it comes to any mod (big or small) they must be compiled in order to be used by Tmodloader. The following page shows exactly how to compile this mod like every other Tmodloader mod. If you are already familiar how to compile a mod through visual studio then this page can be ignored.

NOTE!!!!

This mod uses BepInEx publicizer, which means it CANNOT be compiled through Tmodloader's in-built mod compiler and requires to be compiled through an external API (such as visual studio) due to Tmodloader not having support for Dotnet building.

Compiling the Library


Due to ModLiquidLib being in a very early alpha stage, the mod is not available on the Tmodloader workshop right now. Despite not being developed enough to have beta releases on the workshop, it is stable enough for modders or play testers to use alongside other mods using this library as a dependency.

This page shows how to turn the code in this GitHub repository into a .tmod file that can be loaded from the in-game mod menu.

Downloading the source


When compiling the mod, you'll need to download all the code to be able to turn it into a working mod. There are two methods of downloading the source code onto your pc.

For players or mod developers looking to use this mod alongside another,

the source can be downloaded from the Github website itself.

  • Firstly, go to the main '<> Code' page at https://github.com/Lion8cake/ModLiquidLib

  • Secondly, navigate to the green '<> Code' button on the top right side above the source itself. image

  • Thirdly, Clicking on this button should dropdown with some options, the option wanted here is the Download Zip button. This will download a zip file containing all the code from the source. (NOTE!!! DO NOT DOWNLOAD CODE FROM SOURCES YOU DO NOT TRUST, ALWAYS MAKE SURE THEY ARE TRUSTWORTHY BEFORE DOWNLOADING!)

image

  • Fourthly, once the zip file is downloaded, find the file in your downloads and open it. Inside the zip file you should find a folder called ModLiquidLib-main, copy or cut this folder and paste it in your ModSources folder in Tmodloader's files. Usually this is found at:

C:\Users\{your user here}\Documents\My Games\Terraria\tModLoader\ModSources

or

C:\Users\{your user here}\OneDrive\Documents\My Games\Terraria\tModLoader\ModSources (it is recommended that you disable OneDrive as it can mess with Tmodloader files and cause Tmodloader to be unable to access files).

Keep in mind for some Tmodloader betas/previews or if you have these files somewhere else, you should paste this folder in that directory.

If the ModSources folder does not exist, create a new folder with that name.

Once pasted in, rename the folder from ModLiquidLib-main to ModLiquidLib (This is so that the folder is correctly identifiable by visual studio).

  • Lastly, make sure that there is no additional extra folders between ModSources and the ModLiquidLib folder containing the (.cs/c#) code files. If you directly extract the ModLiquidLib zip folder, then there will be an extra folder inside. (For example: ModSources\ModLiquidLib\ ModLiquidLib isn't wanted, we want ModSources\ModLiquidLib)

For mod developers looking to contribute to ModLiquid Library,

the source should be downloaded from your own forked version of this GitHub repository. This will allow you to make edits to your own personal copy of ModLiquidLib and then be able to Pull Request those changes to this GitHub page. The source will be downloaded through the GitHub Desktop app after the repository has been forked, there is a tutorial in this section on how to get GitHub desktop set-up.

  • Firstly, go to the main '<> Code' page at https://github.com/Lion8cake/ModLiquidLib

  • Secondly, navigate to the 'Fork' button on the far right, in between the 'Watch' and 'Star' buttons

  • Thirdly, Clicking on the Fork button will bring you to a new page that will create a new fork. Everything on this page is purely optional and can be left as is if you want. It is suggested that you only copy over the Main branch, as other branches are either unstable, behind a few updates or are for testing features. To create the fork click the 'Create Fork' button. Once created you'll now have your own copy of ModLiquidLib under your own account.

  • Fourthly, You'll need to setup GitHub Desktop. It's an app that allows you to make changes to any of your GitHub repositories extremely quickly by simply modifying files locally on your computer. If you have GitHub desktop, you can skip the installation part of setting up GitHub Desktop.

Downloading and Using GitHub Desktop

  • First, you'll want to go to https://desktop.github.com/download/ to download the installer for the GitHub Desktop app.

  • Secondly, once downloaded, execute the GitHubDesktopSetup app and follow through the process of installing the application. Once installed you'll want to sign into the app using your GitHub account login.

  • Thirdly, when on the 'Let's get started!' page of the GitHub desktop app, click on the 'Clone a repository from the Internet...' button. This will have a new window pop up showing you all your GitHub repositories you can clone. Select the repository named {Your Github Name}/ModLiquidLib and make the path:

C:\Users\{your user here}\Documents\My Games\Terraria\tModLoader\ModSources

or

C:\Users\{your user here}\OneDrive\Documents\My Games\Terraria\tModLoader\ModSources (it is recommended that you disable OneDrive as it can mess with Tmodloader files and cause Tmodloader to be unable to access files).

(If you already have folders in ModSources, Add \ModLiquidLib at the end of the path, and the move all the source out of that folder. GitHub desktop (once realizing that the files have moved) will give you the option (after the repository has been cloned) to select where the files are located allowing you to have the path ModSources\ModLiquidLib rather than ModSources\ModLiquidLib\ModLiquidLib)

  • Lastly, Clicking the 'Clone' will clone the repository and all the files from the project will be downloaded on to your local computer.

The project files should now all be on your computer whether you're looking to contribute or not to the library.

Compiling the source