Tararia is a horizontal action adventure game. Players can use MOD freely in the game, but many players still don't know how to use MOD maker tModLoader. It is difficult for novice players to make their own MOD, but don't worry. Today, Bian Xiao brings you a graphic tutorial on using tModLoader in Tararia and a complete guide to using tModLoader. For those who don't know how to use tModLoader, let's take a look.
Tara rhea tModLoader using graphics tutorial;
TModLoader is a powerful tool for making MODS, and it can also be used to be compatible with some MODS that must use it. The following small series will explain the production process and common problems of MOD for everyone.
Introduction to TModLoader:
TModLoader is essentially a TAPI? Mode? , provides a way to load your own MOD, so you can operate it without the source code of TR, that is to say, you can easily make your own MOD compatible with other people's productions, and you don't need to decompile and recompile Terraria.exe yourself, avoiding having to understand all the incomprehensible things? Complex? TR source code.
The author's goal is to make TModLoader as simple as possible, and at the same time give the game module powerful game functions. Secondly, anyone can make their own independent MOD on TModLoader.
The game is introduced:
Tara rhea's tModLoader introduces the use of graphic tutorial tools; Use the error solution in the tutorial; Examples of production processes; Frequently asked questions.
Tararia Raiders Drug Synthesis Table Daquan BOSS Play Daquan Circuit Novice Tutorial Various Plant Planting Methods Online Tutorial Top Ten Jewelry Ranking Item Synthesis Method Monster Weakness Raiders FAQ Answering Advanced Weapon Synthesis Method Equipment Acquisition Method Novice Points to Pay Attention to Download Recommended Archive Daquan Modifier Daquan MOD Daquan
Use the tutorial
Tara rhea's tModLoader introduces the use of graphic tutorial tools; Use the error solution in the tutorial; Examples of production processes; Frequently asked questions.
1. This is the interface. Let's open it first.
Mod source
2. Then let's ignore the interface and click open source first.
Then you will jump to the mod production directory.
C: user administrator document gamesterrariaModLoader (different computers may have different addresses, but the directory must be ModLoader)
By the way, the characters and files of this mod are independent.
Mod directory, if we want to make mod, we should first create a folder with any name ... but there are no spaces.
For example, "super Mod" will not work.
3. Then I create a file called. FirstMod? Folder of
After that, we will create one in the folder.
? The existence of MODBase is like the tapi of 1.24 1.
We call it ... FirstMod.
Use the system;
Use Microsoft. Xna. framework;
Use Terraria
Use Terraria. ID;
Use Terraria. ModLoader
Use FirstMod. Articles; //Don't change this. After it is changed, it will be very troublesome to modify it.
Namespace FirstMod
{
Public class FirstMod: Mod
{
Public override void SetModInfo (output string name, reference string version, reference string author)
{
Name = "first Mod ";; //Here is the name of the mod displayed in the game.
version = " v 1 "; //Version number
Author = "CWOF// author
}
Public Override Invalid Load ()
{
AddItem("BlackKing ",new BlackKing()," first mod/Items/BlackKing "); //Read the new project and read the pictures of the new project.
}
Public override void AddRecipes ()
{
ModRecipe recipe = new modrecipe (this);
Recipes. Adding entry (ItemID. DirtBlock,2); //Need: 2 pieces of soil.
Recipes. SetResult(null, "Nidhogg",1); //Synthetic black gold
Recipes. add recipe(); //Add Synthesis
}
}
}
Pay attention to the place and know for yourself.
Public override void AddRecipes () These, like a formula, just put them in.
5. The items in the finished product use FirstMod. The item corresponds to the item in the picture folder.
After that, we will create new weapons/equipment/ornaments and so on in the items folder.
But first we need a png and cs file (note that CS and png must have the same name).
Then we edit the BlackKing.cs file (lz uses vs, but because vs2G is relatively large, it is not recommended if there is no special need).
6. A set of formulas
Use the system;
Use Terraria
Use Terraria. ModLoader
Use the system. Diagnosis;
Use Microsoft. Xna. framework;
Namespace FirstMod project
{
Public course black gold: ModItem
{
Public override void SetDefaults ()
{
}
}
}
Then we began to define our first project.
We need to give it a name.
So, we rewrite void SetDefaults () in public.
{
}
It says
Item.name = "Nidhogg";
Then, besides the name, the most basic thing of an item is the introduction, width and height.
therefore ..
Item.toolTip = "Black flame? ;
item.height = 40
item.width = 40
Attention? ; ? No, you should know that Indians can't speak Chinese (? Aboriginal people), don't type in Chinese? ; ?
This is the composition of a basic project.
But what we want is weapons.
7. So add more? Attribute?
item . use time = 5; //This is the time interval when weapons are used.
item . use animation = 5; //This is the speed of waving weapons, that is, using animation.
item . use style = 1; //Use by waving.
item . rare = 5; //Commodity quality
Item.autoReuse = true// Do you want to send it again?
item . damage = 10; //Injured
item . value = 10000; //price 10 silver coin, and the forward speed is the currency speed of tr.
This is a basic weapon, and then, if this is a melee weapon, what should we do? Tell? It, so that it can play a special role (such as wearing a ghost mask, magic weapons will suck blood)
So, let's write.
item . mily = true;
If it is a long-range weapon, it is
item.ranged = true
If it's a magic weapon,
item.magic = true
Oh, by the way, only one can be piled. Because this is a weapon.
item . maxstack = 1;
So, weapons are ready.
PS: "FirstMod" in the namespace FirstMod. Items refers to the name of this mod folder ... don't copy it directly.
8. Then, the finished product is as follows.
Use the system;
Use Terraria
Use Terraria. ModLoader
Use the system. Diagnosis;
Use Microsoft. Xna. framework;
Namespace FirstMod project
{
Public course black gold: ModItem
{
Public override void SetDefaults ()
{
Item.name = "Nidhogg";
item . damage = 1;
item . mily = true;
item.width = 40
item.height = 40
Item.toolTip = "Your first weapon." ;
item . use time = 5;
item . use animation = 5;
item . shoot = 45 1;
item.shootSpeed = 2f
item . use style = 1;
item . knock back = 6;
item . value = 10000;
item . rare = 8;
item . use sound = 1;
item.autoReuse = true
item . maxstack = 1;
}
}}
The model is ready (only the model of one weapon is ready)
We want it to appear in the game, so open the game.
Open the MOD source.
Oh, right. ...
The synthesis of this weapon corresponds to the synthesis in the "first mode" above.
Public override void AddRecipes ()
{
ModRecipe recipe = new modrecipe (this);
Recipes. Adding entry (ItemID. DirtBlock,2); //Need: 2 pieces of soil.
Recipes. SetResult(null, "Nidhogg",1); //Synthetic black gold
Recipes. add recipe(); //Add Synthesis
}
Do you see it?
When we load it, we can make it in the game.
By the way, this is air synthesis. If you synthesize on something, use this.
Public void AddTile(int tileID)
If you can make it and your weapon can be used, it means that your mod has been made successfully. Enjoy it.
Oh, by the way, the code to start pro is
item.shoot = 304
item.shoot = 3f
This is just an example ... hmm (to express hesitation, etc.) ...
MOD error reporting solution
Introduction to the use of graphic tutorial tools by tModLoader in tara rhea; Use the error solution in the tutorial; Examples of production processes; Frequently asked questions.
So at this point, mod producers will automatically report errors, but why a bunch of * * * *? Because tr itself does not support Chinese, we need to open the place pointed by the arrow.
Then Chinese. ..
I'll take this as an example. You can change it by reading the error message.
Example making process
Tara rhea's tModLoader introduces the use of graphic tutorial tools; Use the error solution in the tutorial; Examples of production processes; Frequently asked questions.
Never mind, let's go find quint first!
Ahem. This is a picture of an ornament. ..
Then, start making. ..
Let's look for differences first. ..
AddItem(" fucker ",new Fucker ()," first mod/items/Fucker ");
Recipe = new ModRecipe (this);
Recipes. Adding entry (ItemID. dirt block);
Recipes. SetResult(null, "asshole",1);
Recipes. add recipe();
Then we started to write the data of this ornament in fuckhole.cs.
Use the system;
Use Terraria
Use Terraria. ID;
Use Terraria. ModLoader
Use Microsoft. Xna. framework;
Namespace FirstMod project
{
Public class bastard: Modim
{
}
}
A set of formulas ... this is a simple understanding. ..
Needless to say, the basic properties of props are put on directly.
Item.name = "Fuck you!" ;
item.width = 24
item.height = 28
Item.toolTip = "Come on KunTe! .";
item.toolTip2 = "Yooooooooooo!" ;
item . value = 10000;
item . rare = 2;
Then, we need to know that it is an ornament. Can we have it? Wear "
So, let's write.
item.accessory = true
It's an ornament. How can it be useless? Therefore, we should set its defense to 5.
item . defense = 5;
(ps: I was dissatisfied and died quickly, and then I wrote item. liferegen =19; //Blood transfusion speed is 19)
Wait, all this has to be written in.
Public override void SetDefaults ()
{
}
inside ..
What about adding role attacks or something? ...
come
formula
Public overlay void update access (player)
{
player . minion damage+= 19f;
}
//Summoner cries blind
Then your ornaments are finished.
Go into the game and have a look.
Attached code diagram
FREQUENTLY ASKED QUESTIONS
Tara rhea's tModLoader introduces the use of graphic tutorial tools; Use the error solution in the tutorial; Examples of production processes; Frequently asked questions.
Q: I don't know the id of the items in the game. What should I do?
A: The picture can be de-edited, and its name is Item_id. There is an id mount (table) in the wiki, and the suffix is changed to Data_IDs in the gamepedia.
Here it is. Very convenient.
Q: What if I don't know the variables in the game?
A: Most of the variables in the library are English combinations, but you can't just guess. Those who have the ability can try to reverse the source. Who can control you if you have the ability? I won't say this either. If you don't have the ability, you can learn other MODS. You can also ask me (I'm fucking lazy)
Q: How to open it! Mod will not be installed! The code is so complicated!
A: I suggest learning the basics before coming back. Speaking of which, a classmate wants to ask me trmod. I asked him if he could learn the basics. He asked me in turn, what is the basic knowledge? I want to learn to do mod. It's like
Brother, I want to write a composition. All right, teach me to read. So I suggest you make up the basic knowledge. Tr is made by C #, so you can learn its grammar. Lz is also in the learning stage. ? Do you have a master? Can you show it to me? Teach me. ? This kind, sorry, no.
Read the graphic tutorial of tara rhea tModLoader brought by Tiegu Bianxiao above. Do you know the relevant information? Yes! Come and download more latest and most interesting mobile games!