tModLoader Official tModLoader Help Thread

Does anyone know how to quickly switch between vanilla and modded (on mac) so I can not have to spend 15 minutes switching between the two :D
 
So I'm just starting out and was looking at the example mod to get an idea of how it's done. Not even 3 minutes in and I'm already confused. How does creating a class that extends the ModPlayer class allow the game to access it? Does the game check every class that extends that one? Or how does that work? And which library (or whatever you call what the 'using' is paired with) is ModPlayer even from? Also, I don't know what the square brackets mean in "[AutoloadEquip(EquipType.Neck, EquipType.Balloon)]" in the SimpleModPlayer.cs file. Just judging from the surrounding syntax, it's not an array, and it's not part of a comment, so I'm clueless.
 
Could anyone show me the code that's needed for copying a modded accessory's UpdateAccessory and storing it in a new item? I can't understand anything about it...
 
You guys should update the modloader. Everyone ive talked to has the same problem. It should be for 1.3.5.3, not 1.3.5.2.
 
Last edited:
You guys should update the modloader. Everyone ive talked to has the same problem. It should be for 1.3.5.3, not 1.3.5.2.
Sure... but would it be worth it? If you take a look at the changelog for version 1.3.5.3, there's not a lot of important stuff. In fact, the only change there that I (as a person who understands English) would deem important is "Fixed Eater of Worlds despawning at rare situations in multiplayer", and even then that's a "rare" thing that applies to just a single boss in multiplayer only. Not to mention that version 1.3.5.3 may have multiple "behind-the-scenes" or "under-the-hood" changes that could cause certain existing mods to be incompatible with that version of Terraria, and stuff like that.

Please don't get me wrong, though, I do agree, especially as the official tModLoader thread says "tModLoader is designed in a way as to minimize the effort required for me to update to future Terraria versions", but while I do agree that tModLoader should be updated when Terraria is (even more so when Terraria isn't for a period of time, and version 1.3.5.3 came out just 4 days after 1.3.5.2), I see reasons as to why not (see above), and I can agree with those reasons.
 
Need Help trying to create a tree for my custom biome (for my custom mod) but this error appears (My mod Name is splatoon but has nothing to do with it.)
The method or operation is not implemented.
at Splatoon.Tiles.BalloonSapling.SetDefaults()
at Terraria.ModLoader.TileLoader.SetDefaults(ModTile tile)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)

Code on attached file. please don't edit. if this isn't the problem pls tel me
 

Attachments

  • BalloonSaplingTile.cs
    2.3 KB · Views: 158
Please Help me with code.... (Remember to read picture...)

using Terraria.ID;
using Terraria.ModLoader;

namespace LeoMod.Items.Weapons
{
public class LeoSword : ModItem
{
//public override void SetStaticDefaults()
//{
//DisplayName.SetDefault("Leo Sword");
//Tooltip.SetDefault("The Great Sword of Leo");
//}
public override void SetDefaults()
{
item.damage = 40;
item.melee = true;
item.width = 40;
item.height = 40;
//item.toolTip = "The Great Sword of Leo";
item.useTime = 10;
item.useAnimation = 10;
item.useStyle = 1;
item.knockBack = 10;
item.value = 10000;
item.rare = 2;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(Terraria.ID.ItemID.DirtBlock, 10);
recipe.AddTile(Terraria.ID.TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}


Yes all the files are correct. And I am happy with the recipe.
 

Attachments

  • 20181120171038_1.jpg
    20181120171038_1.jpg
    146.2 KB · Views: 154
Hey, i asked my question first, but to fix your problem kittycatgamer, i have a question. does the sprite for the sword have the same name as the .cs file? if not, Name it the same as the file but remove the .cs, if that doesn't work tell me i've done this before. and also, can someone plz solve my problem.
 
So uh slight problem for me, I've reloaded the mod browser a few times but I can't seem to find calamity's update, 1.4.0.0.1, and I don't know why. If it's because they haven't "officially released" the new update yet or something pls let me know, if not let me know how to fix it
 
Can anyone help me out here? I have no idea why this pickaxe isn't working in-game.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace ExpansiveMoonLord.Items.Tools
{
public class StoneEaterMKI : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Stone Eater MK I");
Tooltip.SetDefault("MUST ABSORB STONE");
}
public override void SetDefaults()
{
item.damage = 0;
item.melee = true;
item.width = 32;
item.height = 32;
item.useTime = 2;
item.useAnimation = 2;
item.pick = 40;
item.useStyle = 1;
item.knockBack = 0;
item.value = 0;
item.UseSound = SoundID.Item1;
item.rare = 3;
item.autoReuse = true;
item.useTurn = true;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.IronPickaxe, 1);
recipe.AddIngredient(ItemID.StoneBlock, 20);
recipe.AddIngredient(ItemID.Diamond, 6);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
 
Hello everyone! I am having a slight problem with adding a buff from the UpdateAccessory method of a ModItem. I want to make my accessory give the Leaf Crystal buff (the same as the Chlorophyte Armor Set Bonus), and after looking at Terraria's source code, here is what is in the source code for the Chlorophyte Set Bonus:

Code:
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using Terraria.ModLoader;

namespace EssenceOfTerraria.Items.Accessories
{
    public class ChlorophyteEssence : ModItem
    {
        public override void SetStaticDefaults()
        {
            Tooltip.SetDefault(Language.GetTextValue("ArmorSetBonus.Chlorophyte"));
        }

        public override void SetDefaults()
        {
            item.value = 1;
            item.rare = 1;
            item.width = 30;
            item.height = 30;
            item.accessory = true;
            item.stack = 1;
        }

        public override void UpdateAccessory(Player player, bool hideVisual)
        {
// This is the part I am talking about---------------------------------------------
            player.AddBuff(BuffID.LeafCrystal, 18000, true);
// -----------------------------------------------------------------------------------------
        }
    }
}

However, the buff keeps on flashing, so the Crystal shoots insanely fast. What am I doing wrong? How can I make it so that the buff behaves the same way as the Chlorophyte Armor Set Bonus? Thanks in advance!
 
I need help. I just installed modded terraria, and am having trouble finding the config.json file. This is important because then I am not able to enable seeds, which is a HUGE problem for me. Can someone help?
 
Hi all,

I'm trying to play a modded Terraria with some friends but I find myself crashing each time I load into the server.

client-crashlog.txt says:
Code:
12/16/2018 8:24:26 AM
System.InvalidProgramException: Invalid IL code in Terraria.Main:DrawToMap_Section (int,int): IL_005a: call  0x060002e6


  at Terraria.Main.do_Draw (Microsoft.Xna.Framework.GameTime gameTime) [0x01128] in <e24c815ea5d749ca88f366401db4a98a>:0
  at Terraria.Main.DoDraw (Microsoft.Xna.Framework.GameTime gameTime) [0x00000] in <e24c815ea5d749ca88f366401db4a98a>:0

Installed mod list:
AnglerQuestAnnouncement
BetterNightSky
CalamityMod
Census
EmojiSupport
ExtensibleInventory
HamstarHelpers
HelpfulHotkeys
HEROsMod
MaxStackPlus
MoreEndlessAmmo
TerrariaHooks

Edit:
I've come to the conclusion that Calamity is my problem. I removed the mod on server and client side and was able to join the server.

Thanks :)
 
Last edited:
This is my first time on this forum so no clue if this is where I’m supposed to put my question but, I have calamity mod and a few others downloaded and I’ve noticed that monsters especially frost moon and pumpkin moon monsters have a LOT of health like a crazy amount and I’m not sure if this is a part of a mod or a glitch, a scare crow from the pumpkin moon has 7500 health. If anyone knows why this is happening please tell me.
 
Back
Top Bottom