Skip to content
This repository has been archived by the owner on Apr 5, 2021. It is now read-only.

Modding with Tea

Mellozx edited this page Oct 10, 2020 · 1 revision

The first thing you have to do is decide on the program that you wish to code in. There are essentially two choices, a text editor or an IDE. If you are completely new to the concept of binary logic and design, you might want to start with a text editor to get the hang of the basics and be able to work with simple code without feeling overwhelmed by the interface and tools of an IDE. For most other cases, an Integrated Development Environment is what you want to use. An IDE is software that sets up a convenient interface for a particular programming language, in our case it's C# and. An IDE can do anything text editors can do because a text editor is just a component of the IDE.

This guide will get you familiar with Tea modding and will help you make your first mod. Please read and follow Basic Prerequisites

Your First Mod To start, we will make a very simple mod to get you familiar with how mods are created for Tea.

Generating a Mod First things first, You need to make a Mod Extending Class. After that you are initially set and good to go. You can now successfully build a mod.

Basic Info:

[ModName].cs - This is the Mod class. It is the central file to any mod. One and only one Mod class can exist in every mod. For simple mods this file will be very sparse, but in this class various global things can happen such as modifying music. description.txt - Contains text for the description of the mod. Click the More Info button in the Mod menu to view in game. build.txt - Contains the version, author, and display name of your mod. Can contain other values. Necessary.

Learn how to Build a Mod:

We now have a ready-made mod ready to be built. Start up Tea and click on the Mod Sources menu item. Now click the build and reload button. If you didn't get any errors, your mod will show up in the Mods menu!

Experimenting:

Experiment a little! You have now created your first mod. Know how to build it as well. You are now set and ready to go. Experimenting is the best way to see how things work. You can view ExampleMod for examples. Change Values and other things to get a good understanding of how most things work.

How do Tea hooks work?

Firstly, they are technically not hooks. We simply call them hooks because it is easy. A 'hook' is a function you can use as a Modder. Which hooks are available depends on the class you're working in. For example your Mod class has a Load Hook, which is a function special to the Mod class. Every one of these functions is virtual, this means the function has a basic implementation but can be overridden by the Modder if desired. This means when you want to use a hook, you override it, this is why the word virtual is replaced with override. Since the virtual (partial) implementation is overridden, that implementation will be lost. To see the standard implementation of hooks you should see ExampleMod.

.

Clone this wiki locally