Standalone [1.3] tModLoader - A Modding API

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
 
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();
        }
    }
}
 
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.

View attachment 164974

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();
        }
    }
}
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
 
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
 
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
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.
 
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?
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?
 
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.

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?
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:
when I try to open it moded terraria it says: terraria: error "system.diinotfoundexception: unable to load dll 'csteamworks': the specified module coud not be found. (exception from hersult: 0x800700e) at steamworks.nativemethods.steamapi_restartappifnecessary(appld_tunownappid)
at terraria.social.steam.coresocialmodule.initialize()
at terraria.social.socialapi.initialize(nullable'1 mode)
at terraria.program.launchgame(string[] args)
why dose this happen? how can I fix it? plz help!
[doublepost=1491606519,1491606333][/doublepost]when I try to open it moded terraria it says: terraria: error "system.diinotfoundexception: unable to load dll 'csteamworks': the specified module coud not be found. (exception from hersult: 0x800700e) at steamworks.nativemethods.steamapi_restartappifnecessary(appld_tunownappid)
at terraria.social.steam.coresocialmodule.initialize()
at terraria.social.socialapi.initialize(nullable'1 mode)
at terraria.program.launchgame(string[] args)
help me
[doublepost=1491606667][/doublepost]when I try to open it moded terraria it says: terraria: error "system.diinotfoundexception: unable to load dll 'csteamworks': the specified module coud not be found. (exception from hersult: 0x800700e) at steamworks.nativemethods.steamapi_restartappifnecessary(appld_tunownappid)
at terraria.social.steam.coresocialmodule.initialize()
at terraria.social.socialapi.initialize(nullable'1 mode)
at terraria.program.launchgame(string[] god help me
 
Last edited:
Is there something wrong with tmodloader? Because it seems like harpies won't spawn :/, even with my mods disabled. I went all the way to space and harpies still won't spawn
 
Is it possible to have a tile that has multiple textures, a random one of which is picked when it is placed? Like books in vanilla, for example.

Try reinstalling Terraria through Steam, it seems like a file is missing. You might have to reinstall tModLoader after doing so, but I'm not sure about that.
 
Hey, can someone help me to find something about how to create Worm boss? I have sprites already but don't know how to create this.
 
Is it possible to have a tile that has multiple textures, a random one of which is picked when it is placed? Like books in vanilla, for example.
Yeah, it involves TileObjectData.RandomStyleRange

Here is the Books vanilla tile.
Code:
            TileObjectData.newTile.CopyFrom(TileObjectData.StyleOnTable1x1);
            TileObjectData.newTile.StyleHorizontal = true;
            TileObjectData.newTile.RandomStyleRange = 5;
            TileObjectData.addTile(50);
You can see that there are 5 options for a single place style:
Tiles_50.png
 
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
Then I really don't know what the problem could be. Can you get Vanilla Terraria to work still?
 
Hi idk why but I can't start tmodloader please contact me here or at : <Link Removed by Staff>
 
Last edited by a moderator:
Will tModLoader update to have the texture pack support soon?
It already does. It even let's you have multiple packs. Unlike vanilla, you place any number of zip files into a TexturePacks folder in the save directory rather than just a single TexturePack.zip file.
 
Back
Top Bottom