tModLoader tModLoader, GitHub integration, a confusion...

Nakano15

Terrarian
I should have asked this months ago, but I always get busy with my mod and projects, so I never actually managed to ask.
Beside, due to the question Itself, you may end up asking yourself how I managed to get that idea on my head, but It's better to ask before I may end up doing a mistake.

How does the Github integration works, for mod version downloading? For some reason, after reading the text about It on the modloader wiki, I got on my mind that the version of the mod It downloads is the same as the last commit on github source, which the modloader downloads and compiles after download.
Even I find this idea quite stupid, and I'm thinking that It actually downloads the mod from Release part of GitHub.

So... Which one of those is right? I will end up offering early access to unfinished mod versions or It gets the mod update from Release part?
 
When you click the upload button in TModLoader roughly the following happens:
  • The source code from your My Games\Terraria\ModLoader\Mod Sources gets compiled again into a .tmod file. (Even if was already up to date.)
  • This new .tmod file is signed.
  • The latest commit on your master branch is tagged with the version from your build.txt.
  • A new release is created targeting this tag, and the .tmod file is uploaded into it, as an attachment.
When someone tries to download the mod from the mod browser, it will be fetched from the attachment in the newest release. No compilation is involved here. You shouldn't create new releases in GitHub manually, that will mess thing up. You can commit whatever you want though, TModLoader doesn't really even care about the code in the git repo. Ideally you'd want the repo to match what is in your Mod Sources the moment you do the upload. Otherwise the tag is gonna be on the wrong commit.

So yeah, you kinda just have to pay attention, and hope you don't mess anything up. The whole GitHub integration thing is really messy, it's not a proper CI system, or anything like that...
 
Oh, so It builds the mod and then sends as a new release to github, when I press upload button?
It is less hairy than what I thought. Beside I remember seeing on the wiki not to upload the mod through the client, due to some kind of bug that could cause. Outdated info, I guess?
 
Oh, so It builds the mod and then sends as a new release to github, when I press upload button?
Yeah, I mean, it's basically the same as how it works normally, but instead of javid.ddns.net, the .tmod file is uploaded to GitHub.

Beside I remember seeing on the wiki not to upload the mod through the client, due to some kind of bug that could cause. Outdated info, I guess?
Where did you see that exactly? As far as I know, the TModLoader client has always been the only way to upload mods.
 
Yeah, I mean, it's basically the same as how it works normally, but instead of javid.ddns.net, the .tmod file is uploaded to GitHub.


Where did you see that exactly? As far as I know, the TModLoader client has always been the only way to upload mods.
That probably was another confusion, because of this part on the github authorization page.
Also do NOT make your own releases or the mod browser will be confused and crash.
I somehow managed to understand something else from that, at least related to publishing from tModLoader client.
 
Back
Top Bottom