Standalone [1.3] tModLoader - A Modding API

How do you 'back up' the vanilla Terraria.exe?
Also i'm using Terraria version 1.3.4.4 and tModLoader version 0.9.2.1 and when I try to 'run' the installer it just goes into another folder.
Just rename it to Terraria.bak or something like TerrariaVanilla.exe
 
use
Code:
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace YourModName.Items
{
    public class PickaxeName : ModItem
    {
        public override void SetStaticDefaults()
        {
            DisplayName.SetDefault("Wood Pickaxe-");
            Tooltip.SetDefault("pickaxe-Line1"+ "\npickaxe-Line2");
        }
        public override void SetDefaults()
        {
            item.damage = 2;
            item.melee = true;
            item.width = 32;
            item.height = 32;
            item.useTime = 20;
            item.useAnimation = 20;
            item.pick = 40;    //pickaxe power
            item.useStyle = 1;
            item.knockBack = 6;
            item.value = 10;
            item.rare = 2;
            item.useSound = 1;
            item.autoReuse = true;
            item.useTurn = true;
        }
        public override void AddRecipes()  //How to craft this item
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.Wood, 10);   //you need 10 Wood
            recipe.AddTile(TileID.WorkBenches);   //at work bench
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}

ps. I still have an un solved issue a page or 2 back if anyones in a helpful mood
hey i tryed the new code
Code:
c:\Users\Everybody\Documents\My Games\Terraria\ModLoader\Mod Sources\Test\Items\PickaxeName.cs(28,18) : error CS1061: 'Terraria.Item' does not contain a definition for 'useSound' and no extension method 'useSound' accepting a first argument of type 'Terraria.Item' could be found (are you missing a using directive or an assembly reference?)
 
hey i tryed the new code
Code:
c:\Users\Everybody\Documents\My Games\Terraria\ModLoader\Mod Sources\Test\Items\PickaxeName.cs(28,18) : error CS1061: 'Terraria.Item' does not contain a definition for 'useSound' and no extension method 'useSound' accepting a first argument of type 'Terraria.Item' could be found (are you missing a using directive or an assembly reference?)
try useing
item.UseSound = SoundID.Item1;
instead of = 1
 
2017-07-30.png


how do I fix?
 
try useing
item.UseSound = SoundID.Item1;
instead of = 1
i got this code
Code:
Missing mod: YourModName/Items/PickaxeName
   at Terraria.ModLoader.ModLoader.GetTexture(String name)
   at Terraria.ModLoader.ModItem.AutoStaticDefaults()
   at Terraria.ModLoader.Mod.SetupContent()
   at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
 
Please fix something with tmodlaoder because since v0.10.0.2 there are error with sound with big mods like calamity, spirit mod, Thorium etc. while reloading mods and i cant play! it says stuff like:

The mp3 sound file at Sounds/Music/CaveStoryBossBattle.mp3 failed to load
w Terraria.ModLoader.Mod.Autoload()
w Terraria.ModLoader.ModLoader.do_Load(Object threadContext)

Inner Exception:
Ensure that the specified stream contains valid PCM mono or stereo wave data.
w Microsoft.Xna.Framework.Audio.WavFile..ctor(Stream source)
w Microsoft.Xna.Framework.Audio.WavFile.Open(Stream stream)
w Microsoft.Xna.Framework.Audio.SoundEffect..ctor(Stream stream)
w Microsoft.Xna.Framework.Audio.SoundEffect.FromStream(Stream stream)
w Terraria.ModLoader.Mod.Autoload()
 
I accidentally loaded up a world on multiplayer with more mods than the world was intended for, and now it is stuck on "Requesting world information" when I try to load it up with the original mods. Is there any way to reverse this, or will I have to play with the new mods now?
EDIT: Actually, it turns out that I can't join any world! It, again, gets stuck on "Requesting world information". I have uninstalled and reinstalled the mods, I have checked that the new host has the same mods I do, and I've tried to load up new worlds. Please, any help would be hugely appreciated!
[doublepost=1501519155,1501518931][/doublepost]
Please fix something with tmodlaoder because since v0.10.0.2 there are error with sound with big mods like calamity, spirit mod, Thorium etc. while reloading mods and i cant play! it says stuff like:

The mp3 sound file at Sounds/Music/CaveStoryBossBattle.mp3 failed to load
w Terraria.ModLoader.Mod.Autoload()
w Terraria.ModLoader.ModLoader.do_Load(Object threadContext)

Inner Exception:
Ensure that the specified stream contains valid PCM mono or stereo wave data.
w Microsoft.Xna.Framework.Audio.WavFile..ctor(Stream source)
w Microsoft.Xna.Framework.Audio.WavFile.Open(Stream stream)
w Microsoft.Xna.Framework.Audio.SoundEffect..ctor(Stream stream)
w Microsoft.Xna.Framework.Audio.SoundEffect.FromStream(Stream stream)
w Terraria.ModLoader.Mod.Autoload()

How I fixed this is deleting everything from the mods folder, reloading Terraria, and reinstalling and enabling the mods on mod browser. Hope this helps!
 
Last edited:
I get this error when I load some mods like Thorium, Calamity, Tremor or Terraria Overhaul. Does anyone know how to fix this? https://prnt.sc/g2oj2u The line in spanish says: Object reference not set to an instance of an object. Thank you.
 
Trying to code my bosses loot and its driving me nuts

I want my boss to have a 1/10 chance of dropping its vanity helm, trophy, and a material item. And i want it to always drop 2 different items as well

Its a long story on my frustrating jurney to try and do this myself but ill skip that and ask if anyone has a code segment i can copy for doing this
[doublepost=1501535549,1501535069][/doublepost]Also for the life of me cant get my boss to shoot projectiles
 
Has anyone found a surefire, permanent fix for the mp3 file errors? Because I no longer can go to an older version of tmodloader for it, as one of my mods decided to work for awhile on the earlier version but is no longer co-operating. Plus, it'd be nice to use the latest version without having numerous problems.
 
I'm trying to update my mod in the mod browser, but it keeps saying that the version number in build.txt needs to be changed (I have changed it multiple times, still gives the error)

Any help?
 
Anyone know why my tmodloader server is stuck at "requesting world information" when attempting to join via ip? I've properly port forwarded and checked canyouseeme.org to verify if the port is forwarded.
The mods I'm running are:
Calamity
RecipeBrowser
Spirit
Thorium
Tremor
Wingslot
 
I'm trying to update my mod in the mod browser, but it keeps saying that the version number in build.txt needs to be changed (I have changed it multiple times, still gives the error)

Any help?
Did you build after changing the version and saving? post the file if so.
 
Please i don't know where to go with this problem so please help! i finally figured out that errors that i get are because i "Don't Have enough memory" but when i go to task manager only 54% is used and i don't know what to do because i have a big amount of mods and i wanted to make a BIG modpack and mods like Calamity Thorium Tremor etc. disable so please if someone has a solution please tell me
 
Back
Top Bottom