Standalone [1.3] tModLoader - A Modding API

You are missing a using directive (as it says, read the error)
Add using System.Collections.Generic;


You don't change the name like that, but yes in theory it would change the text unless those lines are hardcoded in translation files (which they might actually be)
[doublepost=1508674149,1508674063][/doublepost]
First of all, the hell are you thinking with the editor looking like that, smh
Second of all, you don't set Main.npcFrameCount in SetDefaults, but in SetStaticDefaults because it is a static collection.
Last but not least, setting those ai fields looks fine
I don't understand that last thing of setting the AI fields. I don't have an advanced english...
 
cb18212 said:
Hey I was working on a project and I currently don't have access to Terraria.
So I was wondering since with every boss when it spawns naturally the game says
"[boss name] has awakened" so if I used this code to modify the name of a boss:

Will it automatically update the "[bossname] has awakened" to "newbossname has awakened"?
You don't change the name like that, but yes in theory it would change the text unless those lines are hardcoded in translation files (which they might actually be)

How would you change the name? I thought the name was stored as a variable that would be accessed whenever you mouse over the enemy to produce the message?o_O
 
Hello! I have a lot (~10 or so mods, including 5-6 "big" ones) of mods, and I recently downloaded another, but when I did, and went to reload all my mods, the game crashed and I got this error message:
Destination array is not long enough to copy all the items in the collection. Check array index and length.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.KeyCollection.CopyTo(TKey[] array, Int32 index)
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Terraria.GameInput.TriggersPack.CompareDiffs(TriggersSet Bearer, TriggersSet oldset, TriggersSet newset)
at Terraria.GameInput.PlayerInput.UpdateInput()
at Terraria.Main.DoUpdate_HandleInput()
at Terraria.Main.DoUpdate(GameTime gameTime)
at Terraria.Main.Update(GameTime gameTime)
I assume this means I have too many mods enabled at once??
 
Hello! I have a lot (~10 or so mods, including 5-6 "big" ones) of mods, and I recently downloaded another, but when I did, and went to reload all my mods, the game crashed and I got this error message:
Destination array is not long enough to copy all the items in the collection. Check array index and length.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.KeyCollection.CopyTo(TKey[] array, Int32 index)
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Terraria.GameInput.TriggersPack.CompareDiffs(TriggersSet Bearer, TriggersSet oldset, TriggersSet newset)
at Terraria.GameInput.PlayerInput.UpdateInput()
at Terraria.Main.DoUpdate_HandleInput()
at Terraria.Main.DoUpdate(GameTime gameTime)
at Terraria.Main.Update(GameTime gameTime)
I assume this means I have too many mods enabled at once??
No, this is just a random error, just try again.
 
question is there a way that there could be a feature that would allow you to turn off t-mod with eaise instead of having to uninstall and reinstall some parts of terraria?
 
question is there a way that there could be a feature that would allow you to turn off t-mod with eaise instead of having to uninstall and reinstall some parts of terraria?
I think I'll just quote something from earlier to save time.
Locate Terraria's game directory and name tModLoaders .exe file (which will be called Terraria.exe) to something else (such as Terraria.tMod.exe) then rename the vanilla .exe file (which will be called something like TerrariaOriginalBackup.exe) back to Terraria.exe. You can create a shortcut to the tModLoader version so that you don't need to rename the files every time you want to swap versions.
 
How do I add more than 1 recipe? I tried doing this:

Code:
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.RottenChunk, 1);
recipe.AddIngredient(ItemID.Pearlwood, 5);
recipe.AddIngredient(ItemID.CrystalShard, 5);
recipe.AddIngredient(ItemID.DirtBlock, 99);
recipe.SetResult(this);
recipe.AddRecipe();
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.RottenChunk, 1);
recipe.AddIngredient(ItemID.Pearlwood, 5);
recipe.AddIngredient(ItemID.CrystalShard, 5);
recipe.AddIngredient(ItemID.DirtBlock, 99);
recipe.SetResult(this);
recipe.AddRecipe();

But, instead it added to the recipe. So, how do I add 2 different recipes without adding them together?

Also, Making my weapons I noticed this:
Capture.PNG

I don't know why there there, plus it's at the bottom below the public override void SetDefaults() and still somehow works.






-BRP2 (BRM2 Maker)
[doublepost=1508895242,1508895119][/doublepost]
how do u make a server
Run the tmodloader server This:
Capture.PNG




For a Tmodloader server use the ones in the red box.
For a Steam Server use: start-server, start-server-steam-friends, and start-server-steam-private.
For for a 24/7 online server, use a hosting website.

Note: TerrariaServer.exe is for vanilla terraria!
 
Last edited:
How do I add more than 1 recipe? I tried doing this:

Code:
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.RottenChunk, 1);
recipe.AddIngredient(ItemID.Pearlwood, 5);
recipe.AddIngredient(ItemID.CrystalShard, 5);
recipe.AddIngredient(ItemID.DirtBlock, 99);
recipe.SetResult(this);
recipe.AddRecipe();
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.RottenChunk, 1);
recipe.AddIngredient(ItemID.Pearlwood, 5);
recipe.AddIngredient(ItemID.CrystalShard, 5);
recipe.AddIngredient(ItemID.DirtBlock, 99);
recipe.SetResult(this);
recipe.AddRecipe();

But, instead it added to the recipe. So, how do I add 2 different recipes without adding them together?

Also, Making my weapons I noticed this:
View attachment 186616
I don't know why there there, plus it's at the bottom below the public override void SetDefaults() and still somehow works.






-BRP2 (BRM2 Maker)
[doublepost=1508895242,1508895119][/doublepost]
Run the tmodloader server This:
View attachment 186617



For a Tmodloader server use the ones in the red box.
For a Steam Server use: start-server, start-server-steam-friends, and start-server-steam-private.
For for a 24/7 online server, use a hosting website.

Note: TerrariaServer.exe is for vanilla terraria!
thanks buddy
 
How do I add more than 1 recipe? I tried doing this:

Code:
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.RottenChunk, 1);
recipe.AddIngredient(ItemID.Pearlwood, 5);
recipe.AddIngredient(ItemID.CrystalShard, 5);
recipe.AddIngredient(ItemID.DirtBlock, 99);
recipe.SetResult(this);
recipe.AddRecipe();
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.RottenChunk, 1);
recipe.AddIngredient(ItemID.Pearlwood, 5);
recipe.AddIngredient(ItemID.CrystalShard, 5);
recipe.AddIngredient(ItemID.DirtBlock, 99);
recipe.SetResult(this);
recipe.AddRecipe();

But, instead it added to the recipe. So, how do I add 2 different recipes without adding them together?

Also, Making my weapons I noticed this:
View attachment 186616
I don't know why there there, plus it's at the bottom below the public override void SetDefaults() and still somehow works.






-BRP2 (BRM2 Maker)
[doublepost=1508895242,1508895119][/doublepost]
Run the tmodloader server This:
View attachment 186617



For a Tmodloader server use the ones in the red box.
For a Steam Server use: start-server, start-server-steam-friends, and start-server-steam-private.
For for a 24/7 online server, use a hosting website.

Note: TerrariaServer.exe is for vanilla terraria!
i made the server, but how do i join it
 
I keep running into an issue when trying to connect to a dedicated server I rented. I installed three mods (Calamity, Tremor, Thorium) on it, but whenever I try to connect, it crashes when it reaches the "finding recipes..." . I am able to join the server fine with the mods not enabled, but all mod items become an "unloaded item".

I am still able to start my own worlds just fine in singleplayer, and it also works when I am hosting the server locally. However, when joining the dedicated server, it causes a crash.
 
Hi, just installed 0.10.1, and whenever i click anywhere in the main terraria menu, my mouse goes to the top left corner. any way to fix this?? (makes the game unplayable)
 
I keep running into an issue when trying to connect to a dedicated server I rented. I installed three mods (Calamity, Tremor, Thorium) on it, but whenever I try to connect, it crashes when it reaches the "finding recipes..." . I am able to join the server fine with the mods not enabled, but all mod items become an "unloaded item".

I am still able to start my own worlds just fine in singleplayer, and it also works when I am hosting the server locally. However, when joining the dedicated server, it causes a crash.
Try Again. If error continues, It may be the file size. Those mods are big. You may need to delete one.

Hi, just installed 0.10.1, and whenever i click anywhere in the main terraria menu, my mouse goes to the top left corner. any way to fix this?? (makes the game unplayable)
Try reinstalling. If it continues, reset your cursor and look inside the TModLoader folder if anythings wrong.
[doublepost=89999999999999999999999999999999999,0][/doublepost]
Um, i've made some harpy weapons, and they give me these errors: https://pastebin.com/31TJWSQ4
You might need to check the recipes.
Are you using any groups or just normal recipes?
Also, you can post the code for extra help.
Here's an example of a good recipe:

Code:
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.RottenChunk, 1);
            recipe.AddIngredient(ItemID.Pearlwood, 5);
            recipe.AddIngredient(ItemID.CrystalShard, 5);
            recipe.AddIngredient(ItemID.DirtBlock, 99);
            recipe.AddIngredient(ItemID.LifeCrystal, 4);
            recipe.AddTile(TileID.MythrilAnvil);
            recipe.SetResult(this);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.Vertebrae, 1);
            recipe.AddIngredient(ItemID.Pearlwood, 5);
            recipe.AddIngredient(ItemID.CrystalShard, 5);
            recipe.AddIngredient(ItemID.DirtBlock, 99);
            recipe.AddIngredient(ItemID.LifeCrystal, 4);
            recipe.AddTile(TileID.AdamantiteForge);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}
 
Try Again. If error continues, It may be the file size. Those mods are big. You may need to delete one.


Try reinstalling. If it continues, reset your cursor and look inside the TModLoader folder if anythings wrong.
[doublepost=89999999999999999999999999999999999,0][/doublepost]
You might need to check the recipes.
Are you using any groups or just normal recipes?
Also, you can post the code for extra help.
Here's an example of a good recipe:

Code:
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.RottenChunk, 1);
            recipe.AddIngredient(ItemID.Pearlwood, 5);
            recipe.AddIngredient(ItemID.CrystalShard, 5);
            recipe.AddIngredient(ItemID.DirtBlock, 99);
            recipe.AddIngredient(ItemID.LifeCrystal, 4);
            recipe.AddTile(TileID.MythrilAnvil);
            recipe.SetResult(this);
            recipe.AddRecipe();

            recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.Vertebrae, 1);
            recipe.AddIngredient(ItemID.Pearlwood, 5);
            recipe.AddIngredient(ItemID.CrystalShard, 5);
            recipe.AddIngredient(ItemID.DirtBlock, 99);
            recipe.AddIngredient(ItemID.LifeCrystal, 4);
            recipe.AddTile(TileID.AdamantiteForge);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}

I have tried deleting some, but the error continues, even if its just one mod running.
 
Adding mod content...
Initializing: ModLoader
Loading Mod: ModLoader
Terraria Server v1.3.5.2 - tModLoader v0.10.1

n New World
d <number>Delete World
m Mods Menu
b Mod Browser

Choose World:
Help? I get this when I use play tmodloader
 
So I run terraria on gog and tried using the tmod from the first post and it downloads and runs tmod 0.9.2.2 and Im trying to play the tremor mod which is made on 0.10.0.2 can someone help me with this?
upload_2017-10-27_13-3-29.png

upload_2017-10-27_13-4-4.png
 
Back
Top Bottom