tModLoader Official tModLoader Help Thread

harble, I believe you need a modplayer file. you should be setting your buffs and such there (the ones from equipment anyway) so you can use the reset function to remove them when they're no longer valid.
 
tModLoader version (0.10.0.1v)
Terraria itself is 1.3.4.4 or something like htat.
tml v0.10.0.1 is on Terraria v1.3.5.2 :)
Yeah, people often confuse the two.. can't blame them I guess

If hes on 1.3.4.4 that means he's using v0.9.2.2 or something like that, pretty outdated.
 
harble, I believe you need a modplayer file. you should be setting your buffs and such there (the ones from equipment anyway) so you can use the reset function to remove them when they're no longer valid.
I thought I had a reset function ( "public override void ResetEffects()" ), unless there's another line that works as a reset that I don't see.
 
I have a question. i'm making a dual boss, in which one boss is far smaller than the other, but the smaller one keeps getting blocked out by the bigger boss.
Is it possible to manually change the way NPC's sprites overlap each other? If not, then does the order in which NPCs are spawned affect their overlaps?
 
I have a question. i'm making a dual boss, in which one boss is far smaller than the other, but the smaller one keeps getting blocked out by the bigger boss.
Is it possible to manually change the way NPC's sprites overlap each other? If not, then does the order in which NPCs are spawned affect their overlaps?
What do you mean? Do you mean the bigger boss' sprite will go over the smaller boss' sprite?
 
Greetings! Long time lover of Terraria, short time lover of mods.
I've mostly played the game solo but as of late a bunch of buds have spoken up interest in playing Terraria, but we want to take on the Tremor mod as well as vanilla.
So we pitched in the five cents we each needed in order to rent a server(CitadelServers is the one we ended up with).

Right now I'm attempting to figure out how to get Tremor to run on it. If anybody has experience with setting up a Citadel terraria server and can help me I'd be super happy. I uploaded Tremor.mod to the mod folder and according to the Mod Manager Tmod is installed but it won't trigger/utilize/activate the tremor mod.

I also noticed each time I restart the server it completely wipes out to a new map...
I'm a hoping someone here is super smart :eek:
 
What do you mean? Do you mean the bigger boss' sprite will go over the smaller boss' sprite?
Yeah. That's currently what is going on, the bigger boss' sprite will go over the smaller boss' sprite. But I am trying to write something so that it will be the other way around.

(Example below, lets just say the Guide is the smaller boss and the Eye of Cthulhu is the bigger boss)
Currently:
index.php
The Bigger boss' sprite is going over the smaller boss' sprite
What I hope to achieve:
index.php
The smaller boss now goes over the bigger boss' sprite.
 

Attachments

  • Current.png
    Current.png
    2.6 KB · Views: 1,048
  • Wanted.png
    Wanted.png
    2.9 KB · Views: 947
Trying to Make wings for mod and I keep on receiving this message:
d:\My Documents\My Games\Terraria\ModLoader\Mod Sources\TheGermaniumMod\Items\FeatherWings.cs(10,30) : error CS0115: 'TheGermaniumMod.Items.FeatherWings.Autoload(ref string, ref string, System.Collections.Generic.IList<Terraria.ModLoader.EquipType>)': no suitable method found to override

d:\My Documents\My Games\Terraria\ModLoader\Mod Sources\TheGermaniumMod\Items\FeatherWings.cs(32,30) : error CS0115: 'TheGermaniumMod.Items.FeatherWings.VerticalWingSpeeds(ref float, ref float, ref float, ref float, ref float)': no suitable method found to override

d:\My Documents\My Games\Terraria\ModLoader\Mod Sources\TheGermaniumMod\Items\FeatherWings.cs(42,30) : error CS0115: 'TheGermaniumMod.Items.FeatherWings.HorizontalWingSpeeds(ref float, ref float)': no suitable method found to override

Code:
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace TheGermaniumMod.Items
{
    public class FeatherWings : ModItem
    {
        public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
        {
            equips.Add(EquipType.Wings);
            return true;
        }

        public override void SetDefaults()
        {
            item.name = "Feather Wings";
            item.width = 30;
            item.height = 28;
            item.toolTip = "Don't go to close to the Sun!";
            item.value = 10;
            item.rare = 2;
            item.accessory = true;
        }

        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.wingTimeMax = 37;  //wings Height
        }

        public override void VerticalWingSpeeds(ref float ascentWhenFalling, ref float ascentWhenRising,
            ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
        {
            ascentWhenFalling = 0.85f;
            ascentWhenRising = 0.15f;
            maxCanAscendMultiplier = 0.2f;
            maxAscentMultiplier = 0.6f;
            constantAscend = 0.135f;
        }

        public override void HorizontalWingSpeeds(ref float speed, ref float acceleration)
        {
            speed = 9f;
            acceleration *= 2.5f;
        }

        public override void AddRecipes()  //How to craft this item
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.Feather, 25);
            recipe.AddIngredient(ItemID.Candle); //you need 10 Wood
            recipe.AddTile(TileID.WorkBenches);   //at work bench
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}
 
Trying to Make wings for mod and I keep on receiving this message:
d:\My Documents\My Games\Terraria\ModLoader\Mod Sources\TheGermaniumMod\Items\FeatherWings.cs(10,30) : error CS0115: 'TheGermaniumMod.Items.FeatherWings.Autoload(ref string, ref string, System.Collections.Generic.IList<Terraria.ModLoader.EquipType>)': no suitable method found to override

d:\My Documents\My Games\Terraria\ModLoader\Mod Sources\TheGermaniumMod\Items\FeatherWings.cs(32,30) : error CS0115: 'TheGermaniumMod.Items.FeatherWings.VerticalWingSpeeds(ref float, ref float, ref float, ref float, ref float)': no suitable method found to override

d:\My Documents\My Games\Terraria\ModLoader\Mod Sources\TheGermaniumMod\Items\FeatherWings.cs(42,30) : error CS0115: 'TheGermaniumMod.Items.FeatherWings.HorizontalWingSpeeds(ref float, ref float)': no suitable method found to override

Code:
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace TheGermaniumMod.Items
{
    public class FeatherWings : ModItem
    {
        public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
        {
            equips.Add(EquipType.Wings);
            return true;
        }

        public override void SetDefaults()
        {
            item.name = "Feather Wings";
            item.width = 30;
            item.height = 28;
            item.toolTip = "Don't go to close to the Sun!";
            item.value = 10;
            item.rare = 2;
            item.accessory = true;
        }

        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.wingTimeMax = 37;  //wings Height
        }

        public override void VerticalWingSpeeds(ref float ascentWhenFalling, ref float ascentWhenRising,
            ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
        {
            ascentWhenFalling = 0.85f;
            ascentWhenRising = 0.15f;
            maxCanAscendMultiplier = 0.2f;
            maxAscentMultiplier = 0.6f;
            constantAscend = 0.135f;
        }

        public override void HorizontalWingSpeeds(ref float speed, ref float acceleration)
        {
            speed = 9f;
            acceleration *= 2.5f;
        }

        public override void AddRecipes()  //How to craft this item
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.Feather, 25);
            recipe.AddIngredient(ItemID.Candle); //you need 10 Wood
            recipe.AddTile(TileID.WorkBenches);   //at work bench
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}
Look in the documentation for the correct method signatures.
 
When i disable a mod and play with a character i used the mod with will my items from that mod then dissapear? And if so is there any way for me to make my character only playable when the mods is Active, beacuese then i would feel much more safe when i know that my progress won't dissapear.

And also, when i try to play with a new character, when i open my inventory, this pops up.
Does anyone know why this happens?
 

Attachments

  • Skärmbild (1).png
    Skärmbild (1).png
    240.6 KB · Views: 204
I have a question is there a way to convert to an older version of terraria and tmodloader because i'm trying to download the mods for mabivsgames epic mod pack season 7.
 
Last edited:
public override void UpdateAccessory(Player player, bool hideVisual)
{
if ( player.selectedItem == 3199) //this conditional judgment dont work.
{

}
else
{
player.itemAnimation = 0;
player.itemTime = 0;
}
}

it's does not work. Can someone tell me why?
i hope when i hand Ice Mirror / Magic Mirror/PDA/Cell Phone.
dont modify player.itemAnimation and player.itemTime.
It's a accessory.
 
Last edited:
public override void UpdateAccessory(Player player, bool hideVisual)
{
if ( player.selectedItem == 3199) //this conditional judgment dont work.
{

}
else
{
player.itemAnimation = 0;
player.itemTime = 0;
}
}

it's does not work. Can someone tell me why?
i hope when i hand Ice Mirror / Magic Mirror/PDA/Cell Phone.
dont modify player.itemAnimation and player.itemTime.
It's a accessory.
player.selectedItem is the index in the inventory of the selected item. player.HeldItem will return the item instance of that slot, then you want to check it's type against that number.

player.HeldItem.type == ....
 
Back
Top Bottom