Standalone [1.3] tModLoader - A Modding API

XzysJ6F.png

I think I found a "bug". :D
Shouting that you've found a bug without any other information isn't of any use to us.
You can use this template if you want.
 
There's a bug with the new versions. Every menu on the title screen won't show all the characters/worlds/mods that you have.

EDIT: actually, the scroll bar is just jumping from the top to the bottom instantly.
 
Last edited:
Since updating to 9.2.2 on Linux the mod browser is offline and trying to view mod sources causes Terraria to crash. I might have to roll back to the previous version until it's fixed.
 
Please remember that all questions related to the TML GOG Patcher tool, its patches, the manual GOG diff installer, the raw diff files, and other GOG specific questions should be posted in the TML GOG Patcher Thread or sent to me via a Private Message and should NOT be posted here in the TML thread.

The TML GOG Patcher tool's patches for Terraria 1.3.4.4 and TML 0.9.2.2 have been released: TML GOG Patcher Thread
divider.png


A manual GOG diff installer zip is available for those Windows users that prefer it:
divider.png


The raw bsdiff files are also available, for those that are interested and know what to do with them:
divider.png


As further information for interested parties, here are the SHA256 hashes for patched and unpatched forms of both the client and server files on all three platforms:

Terraria.exe | E723824766898DC294C098E3732BD377D425C86D51D613567432E45D4E0D9287
tModLoader.exe | 48DBF14895C98123F197CE12C4937D4F1D3F6B74EBE0DD7002AD80F5311B44FA
TerrariaServer.exe | D045DB95BE82BE9F5969D942933CFF8F09669840A126419A2933CD0FF42252C6
tModLoaderServer.exe | 6E882505AE1250F185E1FC3345325A8EE05C7C7740785DED8F01F50AC02DF3A3

Terraria.exe | 51E4A57677DB233171FB9E1A78F448EE53A09402A0BC151669F69422A6B7E405
tModLoader.exe | 8233FD5891211D4CB1ACF372C848687189823EBE6E34247B8DE63E2B98DBCD8C
TerrariaServer.exe | 3E6891E03741A20E315387D621A41E1941FD5AC48BE916334B707A7EDD3008C5
tModLoaderServer.exe | 69AC8B0F3A391A6F5DA52E47664740A38BFB3CD2BB4059512441A583F02F95CD

Terraria.exe | 7FE672BA31EF091D5F21A0F2483EBC0F24F4EA9E2FCC3579C7D7CF9537EBD860
tModLoader.exe | B2129F0E08042A7742B2BBDE192FB5C6BBBBECDF6872136D40234AE04D6E2D57
TerrariaServer.exe | 7BAB37C95027DF172936DB06E01426A71218DD223A32B655E47B34D1CEBB06B8
tModLoaderServer.exe | 018459719F2D79B0CBDB0855AC9BF930F72C2AA4274EDEADD617FF00A25EB70E
 
I've been trying to use the PlayerConnect hook to update some fields in my ModPlayer class across a multiplayer game, but I've found what may be a bug. The player.whoAmI in the PlayerConnect hook is always 0. This makes it hard to sent information to the client of the connecting player.

I've worked out how to change a bool of a ModPlayer on one client when a key is pressed, and send the new state to the corresponding ModPlayers on all clients. What I'm trying to do is to send that information to all ModPlayers of a client that just connected. Is there a better way to do this than use the PlayerConnect hook?
 
c:\Users\Modz\Documents\My Games\Terraria\ModLoader\Mod Sources\Trelamium\Items\AEarlyPHM\Slime\SlimeHelm.cs(26,41) : error CS0118: 'Trelamium.Item' is a 'namespace' but is used like a 'type'

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

namespace Trelamium.Items.AEarlyPHM.Slime
{
    public class SlimeHelm : ModItem
    {
        public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
        {
            equips.Add(EquipType.Head);
            return true;
        }

        public override void SetDefaults()
        {
            item.name = "Slime Helmet";
            item.width = 22;
            item.height = 16;
            item.toolTip = "Your hair is sticky";
            item.value = Item.sellPrice(0, 0, 0, 18);
            item.defense = 1;
        }

        public override bool IsArmorSet(Item head, Item body, Item legs)
        {
            return body.type == mod.ItemType("AncientChest") && legs.type == mod.ItemType("AncientLegs");  //put your Breastplate name and Leggings name
        }
        public override void UpdateArmorSet(Player player)
        {
            player.setBonus = "Green slimes are friendly";
            player.npcTypeNoAggro[1] = true;
        }
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.WoodBreastplate);
            recipe.AddIngredient(ItemID.Gel, 30);
            recipe.AddTile(TileID.WorkBenches);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }
}





what is this error???? all my other armor sets have the same code and there working
 
I got it to work for 1 armor set, AFTER i put it in a folder called "Armor" does this mean all my armor needs to go in the "Armor" folder? if it is then i have alot of work to do...:mad:
 
The Mod Browser doesn't seem to work for me on the current version, not sure if it's just me though, anyone else having issues?
Not quite the right place to post this... (The servers are just down; they'll be back up eventually)

However, if you're looking to download one (or more) of my mods, the DropBox downloads are all currently up-to-date, so no worries :)

EDIT: Somehow I thought I was looking at my thread since I usually have that open. Whoops! Anyway, that's the situation here. Also, it looks like the servers are back.
 
Last edited:
I got it to work for 1 armor set, AFTER i put it in a folder called "Armor" does this mean all my armor needs to go in the "Armor" folder? if it is then i have alot of work to do...:mad:
You probably have a namespace called Trelamium.Item somewhere in your code, causing confusing for the compiler since Item is also in Terraria. Go through your files and check your namespaces
 
I Still dont understand why i'm getting this error:

Code:
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Trelamium;
using Trelamium.Items;
using Trelamium.Items.Armor;

namespace Trelamium.Items.Armor
{
    public class AlluminumHelm : ModItem
    {
        public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
        {
            equips.Add(EquipType.Head);
            return true;
        }
        public override void SetDefaults()
        {
            item.name = "Aluminum Visor";
            item.width = 24;
            item.height = 22;
            item.toolTip = "7% Increased Ranged Damage.";
            item.value = 10000;
            item.rare = 4;
            item.defense = 6;
        }
        public override bool IsArmorSet(Item head, Item body, Item legs) //It thinks this is a namespace
        {
            return body.type == mod.ItemType("AlluminumChest") && legs.type == mod.ItemType("AlluminumBoots");
        }
        public override void UpdateArmorSet(Player player)
        {
            player.setBonus = "Faster than the speed of Light.....ing, and immumity to Eletric debuffs."; // the armor set bonus
            player.moveSpeed += 6f;
            player.rangedDamage += 0.07f;
        }
        public override void AddRecipes()  //How to craft this item
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, ("AlluminumBar"), 8);
            recipe.AddTile(TileID.Anvils);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }

ckv.PNG


And i cant update the mod if i keep getting this error...
i never got this error before tModLoader v0.9.2.2
 
now using: Item.sellPrice(0, 0, 0, 0); & Item.buyPrice(0, 0, 0, 0); won't even work.

Something's mismatching. Change all of the "Item" to "Terraria.Item". That should solve things.
Otherwise, there's a namespace called "Item" in your mod, rename that to "Items" like you have with the rest.
 
I Still dont understand why i'm getting this error:

Code:
using System.Collections.Generic;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Trelamium;
using Trelamium.Items;
using Trelamium.Items.Armor;

namespace Trelamium.Items.Armor
{
    public class AlluminumHelm : ModItem
    {
        public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
        {
            equips.Add(EquipType.Head);
            return true;
        }
        public override void SetDefaults()
        {
            item.name = "Aluminum Visor";
            item.width = 24;
            item.height = 22;
            item.toolTip = "7% Increased Ranged Damage.";
            item.value = 10000;
            item.rare = 4;
            item.defense = 6;
        }
        public override bool IsArmorSet(Item head, Item body, Item legs) //It thinks this is a namespace
        {
            return body.type == mod.ItemType("AlluminumChest") && legs.type == mod.ItemType("AlluminumBoots");
        }
        public override void UpdateArmorSet(Player player)
        {
            player.setBonus = "Faster than the speed of Light.....ing, and immumity to Eletric debuffs."; // the armor set bonus
            player.moveSpeed += 6f;
            player.rangedDamage += 0.07f;
        }
        public override void AddRecipes()  //How to craft this item
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, ("AlluminumBar"), 8);
            recipe.AddTile(TileID.Anvils);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
    }

View attachment 164887

And i cant update the mod if i keep getting this error...
i never got this error before tModLoader v0.9.2.2
I still think this is a namespace error somewhere, delete

using Trelamium;
using Trelamium.Items;
using Trelamium.Items.Armor;

and try again.
 
Something's mismatching. Change all of the "Item" to "Terraria.Item". That should solve things.
Otherwise, there's a namespace called "Item" in your mod, rename that to "Items" like you have with the rest.
thank you that worked! :D
[doublepost=1491486429,1491485877][/doublepost]
MoreErrors.PNG
 
Back
Top Bottom