1. For issues you find with the Switch and Console releases, please follow this link and give as much detail as possible. This is the speediest way to get info to Pipeworks and get a hotfix in the works.
    Dismiss Notice

Standalone [1.3] tModLoader - A Modding API

Discussion in 'Works-in-Progress' started by blushiemagic, Jul 7, 2015.

  1. AeroTheHero

    AeroTheHero Terrarian

    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?
     
  2. 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: Apr 5, 2017
  3. jopojelly

    jopojelly Retinazer

    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
     
  4. PankHairStudios

    PankHairStudios Skeletron Prime

    its still doing it....
     
  5. PankHairStudios

    PankHairStudios Skeletron Prime

    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
     
  6. PankHairStudios

    PankHairStudios Skeletron Prime

    now using: Item.sellPrice(0, 0, 0, 0); & Item.buyPrice(0, 0, 0, 0); won't even work.
     
  7. Nopezal

    Nopezal Skeletron Prime

    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.
     
  8. jopojelly

    jopojelly Retinazer

    I still think this is a namespace error somewhere, delete

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

    and try again.
     
    PankHairStudios and Nopezal like this.
  9. PankHairStudios

    PankHairStudios Skeletron Prime

    thank you that worked! :D
    --- Double Post Merged, Apr 6, 2017, Original Post Date: Apr 6, 2017 ---
    MoreErrors.PNG
     
  10. Kazzymodus

    Kazzymodus Lunatic Cultist

    You need to include the code causing the error whenever you get one. Otherwise we can't help you.
     
  11. PankHairStudios

    PankHairStudios Skeletron Prime

    I've already fixed those errors, but now im getting this error about a Zone:
    Code:
    using Microsoft.Xna.Framework;
    using Terraria;
    using Terraria.ID;
    using Terraria.ModLoader;
    
    namespace Trelamium.NPCs
    {
        public class ModGlobalNPC : GlobalNPC
        {
            public override void NPCLoot(NPC npc)
            {
                if (Main.player[Main.myPlayer].ZoneBeach)
                {
                    if (Main.rand.Next(10) == 0)
                    {
                        Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("SeaEssence"));
                    }
                }
                if (Main.player[Main.myPlayer].GetModPlayer<MyPlayer>(mod).ZoneDForest)
                {
                    if (Main.rand.Next(10) == 0)
                    {
                        Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("NatureEssence"));
                    }
                }
                if (Main.player[Main.myPlayer].GetModPlayer<MyPlayer>(mod).ZoneDForest)
                {
                    if (Main.rand.Next(90) == 0)
                    {
                        Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("ForestKey"));
                    }
                }
                if (Main.player[Main.myPlayer].ZoneSandstorm)
                {
                    if (Main.rand.Next(8) == 0)
                    {
                        Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("FearlessWindEssence"));
                    }
                }
                if (Main.player[Main.myPlayer].ZoneTowerVortex)
                {
                    if (Main.rand.Next(20) == 0)
                    {
                        Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.FragmentVortex);
                    }
                }
                if (Main.player[Main.myPlayer].ZoneTowerSolar)
                {
                    if (Main.rand.Next(20) == 0)
                    {
                        Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.FragmentSolar);
                    }
                }
                if (Main.player[Main.myPlayer].ZoneTowerNebula)
                {
                    if (Main.rand.Next(20) == 0)
                    {
                        Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.FragmentNebula);
                    }
                }
                if (Main.player[Main.myPlayer].ZoneTowerStardust)
                {
                    if (Main.rand.Next(20) == 0)
                    {
                        Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.FragmentStardust);
                    }
                }
                if (Main.player[Main.myPlayer].ZoneSpace)
                {
                    if (Main.rand.Next(6) == 0)
                    {
                        Terraria.Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("EssenceOfFlight"));
                    }
                }
            }
        }
    }
    Zones.PNG


    EDIT: it was relplaced with ZoneSkyHeight
     
  12. PankHairStudios

    PankHairStudios Skeletron Prime

    i've worked for 5 hours trying to fix these errors, and now i have to fix it again!
    ugh..

    it's not loading Trelamium in the namespace.

    AnnoyingError#9999999999999999.PNG

    Code:
    using System;
    using System.Collections.Generic;
    using Microsoft.Xna.Framework;
    using Terraria;
    using Terraria.DataStructures;
    using Terraria.ID;
    using Terraria.ModLoader;
    using Trelamium;
    
    namespace Trelamium.Items.Accessories
    {
        public class XarfaliliumBoots : ModItem
        {
            public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
            {
                texture = "Trelamium/Items/Accessories/XarfaliliumBoots";
                return true;
            }
    
            public override void SetDefaults()
            {
                item.name = "Xarfalilium Boots";
                item.toolTip = "Speed of Lucifer himself\nAllows you to walk through lava\nTemporary immunity to lava";
                item.width = 36;
                item.height = 32;
                item.value = Terraria.Item.buyPrice(0, 20, 0, 0);
                item.rare = 8;
                item.accessory = true;
            }
    
            public override void UpdateAccessory(Player player, bool hideVisual)
            {
                player.accRunSpeed = 10f;
                player.rocketBoots = 5;
                player.moveSpeed += 0.9f;
                player.ignoreWater = true;
                player.fireWalk = true;
                player.lavaMax += 500;
                player.wingTimeMax += 50;
            }
    
            public override void AddRecipes()
            {
                ModRecipe recipe = new ModRecipe(mod);
                recipe.AddIngredient(null, ("XarfaliliumBar"), 13);
                recipe.AddIngredient(ItemID.FrostsparkBoots);
                recipe.AddIngredient(ItemID.SoulofNight, 12);
                recipe.AddTile(TileID.MythrilAnvil);
                recipe.SetResult(this);
                recipe.AddRecipe();
            }
        }
    }
     
  13. jopojelly

    jopojelly Retinazer

    This is just you not having the png file in the correct folder: http://forums.terraria.org/index.ph...der-a-modding-api.23726/page-679#post-1122935
     
  14. PankHairStudios

    PankHairStudios Skeletron Prime

  15. jopojelly

    jopojelly Retinazer

    Yep, you spelled accessories wrong in the folder path.
     
  16. PankHairStudios

    PankHairStudios Skeletron Prime

    my bad.
     
  17. PIN3APPL3GAM3R

    PIN3APPL3GAM3R Terrarian

    for one my tmodreader wont work and two whenever i try to open modded terraria it goes error please open from steam client and i did and now its just pissing me off
     
  18. Solo-Ion

    Solo-Ion Dungeon Spirit

    That second error probably means that either you haven't copied tModLoader to Terraria's directory or you don't have Steam running. I don't know why tModReader wouldn't be working.
     
  19. Jofairden

    Jofairden Golem

    Can you tell what is going on? Does the game crash, freeze? Does the mod browser keep on loading? Does the mod browser say OFFLINE?
     
  20. PIN3APPL3GAM3R

    PIN3APPL3GAM3R Terrarian

    Well my tModLoader files are in Windows -> Program Files x86 -> Steam -> steamapps -> common -> Terraria and I open my terraria through the steam app

    Didnt mean to quote Jofairden and im using 0.9.2.2 version of tmod
     
    Last edited: Apr 7, 2017