Standalone [1.3] tModLoader - A Modding API

Hi, I'm having a problem when launching the exe.
System.DllNotFoundException: Unable to load DLL 'CSteamworks': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Steamworks.NativeMethods.SteamAPI_RestartAppIfNecessary(AppId_t unOwnAppID)
at Terraria.Social.Steam.CoreSocialModule.Initialize()
at Terraria.Social.SocialAPI.Initialize(Nullable`1 mode)
at Terraria.Program.LaunchGame(String[] args)
Can anyone help?
 
Hi, I'm having a problem when launching the exe.
System.DllNotFoundException: Unable to load DLL 'CSteamworks': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Steamworks.NativeMethods.SteamAPI_RestartAppIfNecessary(AppId_t unOwnAppID)
at Terraria.Social.Steam.CoreSocialModule.Initialize()
at Terraria.Social.SocialAPI.Initialize(Nullable`1 mode)
at Terraria.Program.LaunchGame(String[] args)
Can anyone help?
You are launching from the Steam install directory, right? Not from an unzipped folder elsewhere?
 
What mod(s) do you have enabled? one of them might not work with multiplayer or conflict with another.
Fargo's mutant mod, cheat sheet, calamity mod, legends of terraria, crystilium mod, thorium mod, tremor remastered, more guns mod, terralands, water biome mod
[doublepost=1486498028,1486497900][/doublepost]
Fargo's mutant mod, cheat sheet, calamity mod, legends of terraria, crystilium mod, thorium mod, tremor remastered, more guns mod, terralands, water biome mod
oh and also imksushi, prefixes for enemies, rpg classes, ersion, nightmare unleased, zoaklen, more katantas, even more modifiers, and spirit mod
 
@Dragonpriest4 My bad, I forgot that projectiles inherit their damage from the item that shoots them. Thanks, @FARemy


Have you located the folder '...My Documents/My Games/Terraria/ModLoader'? That's where your mods, settings, worlds and players are stored. If it was deleted, it would explain why tModLoader has been reset. Maybe have a look in your recycle bin to see if it's there.

Right, so it sounds like all of your saves have been cleared for some reason. I don't know what could cause that, but re-installing tModLoader won't fix anything, I'm afraid.

I wonder if your Worlds and players have been moved to the recycle bin somehow. Or, if you have a backup drive, you could restore your saves from that. Also, are your vanilla worlds and players still there? You could revert to those as a last resort. It's also possible that your saves have been moved somewhere else somehow. You could run a search on your entire hard drive for ".tplr" and see what comes up.


The problem seems to be that his player and world files have gone missing.

oh, might have been reverted back to vanilla by steam for some reason. And the other half of the issue might be your anti virus quarantining the tmodloader exe. Is the icon still a jungle tree, or is it a forest tree.

Jopo, it's still the jungle tree icon like usual when using TModLoader, and Solo, the players and worlds are gone yes, but that doesn't bother me as much. I can always restart those. The main issue is that the mods I had installed are gone, and the mod browser is completely empty. Doesn't matter if I search anything or change any of the buttons in the top left for like downloads or only updates etc.
 
Hello, I'm starting to create a mod and I'd like to implement a hunger system, but I have no idea of the code. Can somebody help me?
 
this pops up when ! open Terraria w tmodloader some of it is in polish sorry for the polish
terraria error.jpg
 
Code:
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace FutureNowMod.NPCs
{
    public class UPOSpy : ModNPC
    {
        public override void SetDefaults()
        {
            npc.name = "UPOSpy";
            npc.displayName = "UPO Spy";
            npc.width = 40;
            npc.height = 20;
            npc.damage = 500;
            npc.defense = 30;
            npc.lifeMax = 500;
            npc.HitSound = SoundID.NPCHit4;
            npc.DeathSound = SoundID.NPCDeath14;
            npc.value = 60f;
                        npc.noGravity = true;
            npc.knockBackResist = 0.3f;
            npc.aiStyle = 2;
            Main.npcFrameCount[npc.type] = Main.npcFrameCount[NPCID.DemonEye];
            aiType = NPCID.EyeofCthulhu;
            animationType = NPCID.DemonEye;
        }

        public override float CanSpawn(NPCSpawnInfo spawnInfo)
        {
            return spawnInfo.spawnTileY < Main.rockLayer && !Main.dayTime ? 0f : 3f;
        }







public override void AI()
        {
            npc.ai[0]++;
            Player P = Main.player[npc.target];
            if (npc.target < 0 || npc.target == 255 || Main.player[npc.target].dead || !Main.player[npc.target].active)
            {
                npc.TargetClosest(true);
            }
            npc.netUpdate = true;
            npc.ai[1]++;
            if (npc.ai[1] >= 230)  // 230 is projectile fire rate
            {
                float Speed = 20f; //Projecile speed
                Vector2 vector8 = new Vector2(npc.position.X + (npc.width / 2), npc.position.Y + (npc.height / 2));
                int damage = 100;  //projectile damage
                int type = mod.ProjectileType("ShadowArm");  //put your projectile
                Main.PlaySound(23, (int)npc.position.X, (int)npc.position.Y, 17);
                float rotation = (float)Math.Atan2(vector8.Y - (P.position.Y + (P.height * 0.5f)), vector8.X - (P.position.X + (P.width * 0.5f)));
                int num54 = Projectile.NewProjectile(vector8.X, vector8.Y, (float)((Math.Cos(rotation) * Speed) * -1), (float)((Math.Sin(rotation) * Speed) * -1), type, damage, 0f, 0);
                npc.ai[1] = 0;
            }
      


        public override void HitEffect(int hitDirection, double damage)
        {
            for (int i = 0; i < 10; i++)
            {
                int dustType = Main.rand.Next(259, 259);
                int dustIndex = Dust.NewDust(npc.position, npc.width, npc.height, dustType);
                Dust dust = Main.dust[dustIndex];
                dust.velocity.X = dust.velocity.X + Main.rand.Next(-50, 51) * 0.01f;
                dust.velocity.Y = dust.velocity.Y + Main.rand.Next(-50, 51) * 0.01f;
                dust.scale *= 1f + Main.rand.Next(-30, 31) * 0.01f;
            }
        }
    }
}
I need help making my npc shoot a projectile. I already tried to copy the part of a boss code that make him shooting projectiles but it does not work.
 
public override float CanSpawn(NPCSpawnInfo spawnInfo)
{
if(!spawnInfo.player.zoneCrimson) return 0;
return 1;
}
Appaerntly zoneCrimson dousn't exist
 
Are tmodloader have bug about camera mode? Because, I use tmodloader today and take pic on my build but it was pure black even though there are torch everywhere. Then the second time the game crash! Please help me :(. Note: If it is a bug I will not put the crash log
 
I just wish to report, that ModBrowser is broken, I wanted to update my Thorium and stuff, and tModLoader instead of updating it, it rather removes it (replaces the mod with 0 KB *.tmod file). The same goes for downloading new mods.
It's probably the cloud-server-thing issue, because it used to work on this patch.
And I wanted to play my Terraria today... (it's already past 2 p.m. for me)
 
Hi, I'm trying to make my wings glow fullbright. I searched this thread and found someone else had the same problem with projectiles, but the code just isn't working for me.
Ninja edit: Also, while I'm here, is there a way to add hoverboard functionality to my wings?
Later ninja edit: Oh, and can I make their rarity rainbow? -2, -3, 12, and 13 don't work.
Code:
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace LithoVanities.Items
{
    public class InfinityWings : ModItem
    {
        public override Color? GetAlpha(Color lightColor)
        {
            return Color.White;
        }
     
        public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
        {
            equips.Add(EquipType.Wings);
            return true;
        }
     
        public override void SetDefaults()
        {
            item.name = "Infinity Wings";
            item.width = 30;
            item.height = 28;
            item.toolTip = "These mythic wings grant the wearer the ability to fly forever-";
            item.toolTip2 = "or at least, for 31 years straight.";
            item.value = 1000000;
            item.rare = 12;
            item.accessory = true;
        }
     
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.wingTimeMax = 999999999;
        }

        public override void VerticalWingSpeeds(ref float ascentWhenFalling, ref float ascentWhenRising,
            ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
        {
            ascentWhenFalling = 0.85f;
            ascentWhenRising = 0.10f;
            maxCanAscendMultiplier = 1f;
            maxAscentMultiplier = 2f;
            constantAscend = 0.135f;
        }

        public override void HorizontalWingSpeeds(ref float speed, ref float acceleration)
        {
            speed = 10f;
            acceleration *= 2.8f;
        }
     
        public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(ItemID.SoulofFlight, 99);
            recipe.AddIngredient(ItemID.LunarBar, 20);
            recipe.AddIngredient(ItemID.FragmentVortex, 7);
            recipe.AddIngredient(ItemID.FragmentNebula, 7);
            recipe.AddIngredient(ItemID.FragmentSolar, 7);
            recipe.AddIngredient(ItemID.FragmentStardust, 7);
            recipe.AddTile(TileID.LunarCraftingStation);
            recipe.SetResult(this);
            recipe.AddRecipe();
        } 
    }
}
 
Last edited:
I have a huge problem with the downloading thing. So I installed terraria fresh from steam and then downloaded Java and tMod. I click tModLoaderinstaller.jar and it successfully installed. Then I opened it and i have been waiting for about 3 hours looking at a black screen. Do I have to install a mod first? Am I an idiot? Any help?
P.S:I have a iMac.
 
I have a huge problem with the downloading thing. So I installed terraria fresh from steam and then downloaded Java and tMod. I click tModLoaderinstaller.jar and it successfully installed. Then I opened it and i have been waiting for about 3 hours looking at a black screen. Do I have to install a mod first? Am I an idiot? Any help?
P.S:I have a iMac.

I had this problem on my Mac about a couple of months ago. What that turned out to be was that Steam had installed an old version of Terraria. No idea why but it installed something like 1.3.0.8. I don't remember exactly what I did to get Steam to update Terraria but once it was updated I reinstalled tModLoader and it worked fine from there (aside from in-game mod browser).
 
Hey, ModBrowser still does not work. Whenever I try to download something, it downloads a 0 KB .tmod file.
Or am I doing something wrong? Does it work normally for you?? (If you wish to check, better make a backup copy of your mods!)

@down: Thank you, sir, but there's still a problem: whenever I try to download something, my browser tells me it's an unsafe, the connection with dropbox isn't protected, so browsers block it.

Does it happen to you too?
 
Last edited:
Back
Top Bottom