Standalone [1.3] tModLoader - A Modding API

Yeahfrick

Official Terrarian
Whenever you have this type of error: no suitable method found to override. You simply replace 'override' with 'static' or 'virtual'
So it should look like this now:

C#:
using System.Collections.Generic;

using Terraria;

using Terraria.ID;

using Terraria.ModLoader;



namespace noname.Items

{

    public class LatormWings : ModItem

    {

        public virtual bool Autoload(ref string LatormWings, ref string LatormWings_Wings, IList<EquipType> equips) // you can also do static.

        {

            equips.Add(EquipType.Wings);

            return true;

        }

        public override void SetStaticDefaults() {

            DisplayName.SetDefault("LatormWings");
            Tooltip.SetDefault("a");

        }

        public override void SetDefaults()

        {

            item.width = 22;

            item.height = 20;

            item.value = 10000;

            item.rare = 4;

            item.accessory = true;

        }



        public override void UpdateAccessory(Player player, bool hideVisual)

        {

            player.wingTimeMax = 10;  //wings Height

        }



        public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising, ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)

        {

            ascentWhenFalling = 0.85f;

            ascentWhenRising = 0.15f;

            maxCanAscendMultiplier = 1f;

            maxAscentMultiplier = 3f;

            constantAscend = 0.135f;

        }



        public override void HorizontalWingSpeeds(Player player, 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(null, "latorm", 10);

            recipe.AddTile(TileID.Anvils);
        }
    }
}
wtf not even a day and you reply
 

Simple

Official Terrarian
Yes, too the wings dont show and dont work
Another thing you can do instead of:
C#:
        public virtual bool Autoload(ref string LatormWings, ref string LatormWings_Wings, IList<EquipType> equips) // you can also do static.

        {

            equips.Add(EquipType.Wings);

            return true;

        }
is add this instead:
C#:
    [AutoloadEquip(EquipType.Wings)]
    public class LatormWings : ModItem
So that there is an autoload on top of your LatormWings
 

Yeahfrick

Official Terrarian
Another thing you can do instead of:
C#:
        public virtual bool Autoload(ref string LatormWings, ref string LatormWings_Wings, IList<EquipType> equips) // you can also do static.

        {

            equips.Add(EquipType.Wings);

            return true;

        }
is add this instead:
C#:
    [AutoloadEquip(EquipType.Wings)]
    public class LatormWings : ModItem
So that there is an autoload on top of your LatormWings
Thx now it works uwu, you saved me a lot of hours thanks lmao
 

shoelid

Terrarian
Hey! New to modding, and I'm posting here with the hope that somebody can help me with my code. I want my weapon to give the player a buff when they right click with it. The issue is that once the player right clicks with the sword, item.buffType is assigned to the entire item. From that point forward, both the left and right clicks assign the buff. How do I unassign item.buffType for the left click functionality? or maybe there's a better way to go about this?

Here's the relevant code:
C#:
public override bool CanUseItem(Player player){ //right click functionality
            if (player.altFunctionUse == 2){
                item.UseSound = SoundID.Item100;//placeholder
                item.useStyle = ItemUseStyleID.HoldingUp;
                item.useTime = 10;//placeholder
                item.useAnimation = 10;//placeholder
                item.noMelee = true;
                item.buffType = ModContent.BuffType<GhostbladeBuff>();
                item.buffTime = 360;
            }
            else {
                item.UseSound = SoundID.Item1;
                item.useStyle = ItemUseStyleID.SwingThrow;
                item.useTime = 10;
                item.useAnimation = 25;
                item.noMelee = false;
            }
            return base.CanUseItem(player);
        }

UPDATE: I've since resolved this issue on my own. Instead of using item.buffType = ModContent.BuffType<GhostbladeBuff>();, I'm using item.buffType = mod.BuffType"GhostbladeBuff". This allows me to use item.buffType = mod.BuffType""; to unassign the buff, fixing my issue.
 

Susuru

Terrarian
Hey, is there any rough estimate for when tModLoader will be compatible with version 1.4.0.5, or any estimated progress percentage?
And will there be an announcement some time before it releases?
 

Nakano15

Terrarian
Hey, is there any rough estimate for when tModLoader will be compatible with version 1.4.0.5, or any estimated progress percentage?
And will there be an announcement some time before it releases?
I think getting an estimate of when the update will come is not a good idea, It will be bad for everyone if the mod loader devs end up rushing the development because the estimate deadline is getting near.

I say that they can take their time to make it.
 

Terri

Terrarian
Guys, I know you're sick and tired of all these "When? When?!!" types of questions, but there's something to be said about not keeping thousands of us totally in the dark. I'm sure a lot of folks are scratching their heads trying to schedule their playthroughs around it. So my question is more realistic one. The mod's dev team has quite a few veterans who worked on 1.3 and earlier versions and can theoretically give an educated estimate of the development progress. Compared to 1.2 or 1.3, and VERY roughly speaking (without going into any promises or estimated timelines, or anything like that) how much progress would you say has been done on 1.4? Closer to a quarter, a half? Are there any serious roadblocks right now that make you feel that the development may drag on longer than expected? I tried to guesstimate these things myself from the GitHub commits but it's way too difficult for an outsider. If you can occasionally give us such basic status updates from time to time, I'm sure many will greatly appreciate it. I know I will.
 

AlexBisc

Terrarian
I installed TmodLoader off steam today and the mod browser wasn't working and neither was the manual mod browser website, saying that it could not be loaded. Is it a problem with the website or my pc?
 
Um...I tried to manually install the TModLoader from the front page of this thread, and I followed the directions by dropping the files into the Steam folder, and that overwrote some files. Now Terraria crashes at the Character Select screen. How do I uninstall it...?

I should have known this wouldn't work, it's not compatible with the latest version of Terraria yet...

I didn't corrupt anything irreparably, did I?
 
I think I fixed it by verifying Terraria's game files on Steam. That was scary. I'll wait until TModLoader is ready for the latest update before installing it this time...
 

Buddha

Terrarian
Um...I tried to manually install the TModLoader from the front page of this thread, and I followed the directions by dropping the files into the Steam folder, and that overwrote some files. Now Terraria crashes at the Character Select screen. How do I uninstall it...?

I should have known this wouldn't work, it's not compatible with the latest version of Terraria yet...

I didn't corrupt anything irreparably, did I?

I installed TmodLoader off steam today and the mod browser wasn't working and neither was the manual mod browser website, saying that it could not be loaded. Is it a problem with the website or my pc?

No clue what you both are doing wrong, but the game and the loader works fine:
1598782404996.png
 
Top Bottom