Skip to content

Instantly share code, notes, and snippets.

View its-truce's full-sized avatar
😶‍🌫️
history is just one damn thing after another

itstruce its-truce

😶‍🌫️
history is just one damn thing after another
View GitHub Profile
@its-truce
its-truce / DecompileMods.md
Last active March 17, 2024 17:17
[tModLoader] How To Decompile Mods

[tModLoader] How To Decompile Mods

NOTE: Please don't copy other people's code unless you have permission. Respect other people's wishes about distributing code. Copying code is plagiarism. This tutorial is only to teach you how to do it.

This is a bite-sized tutorial on how to decompile Terraria mods. If you want to replicate a certain effect that you saw in a mod of your own, you can decompile that mod. Here's how you can do it:

Obtaining the DLL

To obtain the .dll file, we have to use a TML.Patcher, a 3rd party tool for decompiling mods. Here's how you can install and use it:

  • Open Command Prompt.
  • Run dotnet tool install -g Tomat.TML.Patcher to install it.
  • Run tmlpatcher extract "Path/To/The/Mod.tmod" to extract the mod file at Path/To/The/Mod.tmod.
@its-truce
its-truce / Screenshake.md
Last active June 13, 2023 09:24
[tModLoader 1.4.4] How To Add Screenshake

[tModLoader 1.4.3] How To Add Screenshake

This is a bite-sized tutorial on shaking the screen in tModLoader [1.4.3]. It's usually used in boss fights and "heavy" weapons. Here's how you can implement it:

Adding Screenshake

To add screenshake, we use the ModifyScreenPosition hook in ModPlayer. Let's make a new .cs file in a Players folder (for organization; this is usually good for beginners but you can decide where to put it). Here's what our code would look like:

public class ScreenshakePlayer : ModPlayer
{
    public int screenshakeTimer;
 public int screenshakeMagnitude;
@Soheab
Soheab / API's.md
Last active June 1, 2024 07:56
See here some of the API's you can use in your discord bot or anything

Some API's for you.

See here some of the API's you can use in your discord bot or anything. For any help or questions on how to use one, please contact the owner of the API and not me.

A much bigger list of APIs can be found here


[TOKEN] = API requires a token to access some if not all endpoints.

The descriptions are mostly copied from the API, sometimes personal or from the dev.