Standalone [1.3] tModLoader - A Modding API

Hi, i have a problem with tmodloader since terraria 1.3.2 came out . Every time i try to open terraria with modloader nothing happens and when i run it as adm it crashes :
System.DllNotFoundException: Unable to load DLL 'CSteamworks': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A)
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)
modloader works fine with old versions, what should i try to do to fix this ? :/
 
Hi!!! So in my players folder for tmodloader, it is empty, but the game has my player in the game and I can play it, but then when i play vanilla terraria, my player is gone and the players folder is still empty. I don't know what is going but I would really like some help!!!

Ask me if you need any pictures!!!
Thanks for helping!!!

-Enderplayz

P.S, I put my vanilla players in my modloader player folder if this information helps!
 
@Enderplayz_
You shouldn't put your vanilla player in the tmod files. If you get a mod item in that character then move it to the vanilla characters then I heard it can corrupt your character. It has happened to me. Also sounds like to me you didn't copy the files, you just dragged them. Copy the file from tmod players into vanilla players.




In other news, I have a random error AGAIN. Same exact error when I use Al0n37's regular files. The error goes on as:

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Explorer.cs(35,46) : error CS1031: Type expected

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Explorer.cs(35,60) : error CS1519: Invalid token ',' in class, struct, or interface member declaration

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Explorer.cs(35,74) : error CS1519: Invalid token ')' in class, struct, or interface member declaration

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Friendly\Explorer.cs(35,46) : error CS1031: Type expected

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Friendly\Explorer.cs(35,61) : error CS1519: Invalid token ')' in class, struct, or interface member declaration

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Friendly\Explorer.cs(35,77) : error CS1519: Invalid token ')' in class, struct, or interface member declaration



So. My code is:

Code:
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace LivenUP.NPCs
{
    public class Explorer : ModNPC
    {
        public override bool Autoload(ref string name, ref string texture)
        {
            name = "Explorer";
            return mod.Properties.Autoload;
        }
        public override void SetDefaults()
        {
            npc.name = "Explorer";
            npc.townNPC = true;
            npc.friendly = true;
            npc.width = 17;
            npc.height = 22;
            npc.aiStyle = 7;
            npc.damage = 0;
            npc.defense = 5;
            npc.lifeMax = 250;
            npc.soundHit = 1;
            npc.soundKilled = 1;
            npc.knockBackResist = 0.0f;
            Main.npcFrameCount[npc.type] = 25;          
            animationType = NPCID.Guide;
        }
        public override bool CanTownNPCSpawn(14 (numTownNPCs), 500000 (money))
        {
         
            return false;// this make that he will spawn when a house is available
        }



        public override string TownNPCName()
        {                                        //NPC names
            switch (WorldGen.genRand.Next(8))
            {
                case 0:
                    return "John";
                case 1:
                    return "Ephraim";
                case 2:
                    return "Andrew";
                default:
                    return "Sam";
                case 3:
                    return "Dave";
                case 4:
                    return "Hunter";
                case 5:
                    return "Eric";
                case 6:
                    return "Carl";
            }
        }




        public override string GetChat()
        {                                             //npc chat
       
            switch (Main.rand.Next(3))
            {
                case 0:
                    return "Please defend me, I'm just a kid. I can't defend myself, so these walls better be safe.";
                case 1:
                    return "People judge me for being a kid. Atleast you accept me, right?";
                default:
                    return "What time is it? I don't know, do YOU know?";
                case 2:
                    return "I have found the greatest treasures in the land! What? You want some?";
                case 3:
                    return "Huh? You think I'm amazing? Such happy.";
                case 4:
                    return "It's a beautiful day... or night.";
            }
        }

        public override void SetChatButtons(ref string button, ref string button2)
        {
            button = Lang.inter[28];
        }

        public override void OnChatButtonClicked(bool firstButton, ref bool shop)
        {
            if (firstButton)
            {
                shop = true;
            }
        }

        public override void SetupShop(Chest shop, ref int nextSlot)
        {
            shop.item[nextSlot].SetDefaults(mod.ItemType(null, "GrabBag"));
        }

    }
}
 
So, I'm not sure if something is acting up on the server browser, but I seem to be having trouble publishing my mod.
Code:
Timeout dell'operazione.
  in System.Net.HttpWebRequest.GetResponse()
  in Terraria.ModLoader.IO.UploadFile.UploadFiles(String address, IEnumerable`1 files, NameValueCollection values)
  in Terraria.ModLoader.UI.UIModSourceItem.Publish(UIMouseEvent evt, UIElement listeningElement)
 
@Enderplayz_
You shouldn't put your vanilla player in the tmod files. If you get a mod item in that character then move it to the vanilla characters then I heard it can corrupt your character. It has happened to me. Also sounds like to me you didn't copy the files, you just dragged them. Copy the file from tmod players into vanilla players.




In other news, I have a random error AGAIN. Same exact error when I use Al0n37's regular files. The error goes on as:

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Explorer.cs(35,46) : error CS1031: Type expected

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Explorer.cs(35,60) : error CS1519: Invalid token ',' in class, struct, or interface member declaration

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Explorer.cs(35,74) : error CS1519: Invalid token ')' in class, struct, or interface member declaration

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Friendly\Explorer.cs(35,46) : error CS1031: Type expected

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Friendly\Explorer.cs(35,61) : error CS1519: Invalid token ')' in class, struct, or interface member declaration

c:\Users\Ephraim\Documents\My Games\Terraria\ModLoader\Mod Sources\LivenUP\NPCs\Friendly\Explorer.cs(35,77) : error CS1519: Invalid token ')' in class, struct, or interface member declaration



So. My code is:

Code:
using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace LivenUP.NPCs
{
    public class Explorer : ModNPC
    {
        public override bool Autoload(ref string name, ref string texture)
        {
            name = "Explorer";
            return mod.Properties.Autoload;
        }
        public override void SetDefaults()
        {
            npc.name = "Explorer";
            npc.townNPC = true;
            npc.friendly = true;
            npc.width = 17;
            npc.height = 22;
            npc.aiStyle = 7;
            npc.damage = 0;
            npc.defense = 5;
            npc.lifeMax = 250;
            npc.soundHit = 1;
            npc.soundKilled = 1;
            npc.knockBackResist = 0.0f;
            Main.npcFrameCount[npc.type] = 25;         
            animationType = NPCID.Guide;
        }
        public override bool CanTownNPCSpawn(14 (numTownNPCs), 500000 (money))
        {
        
            return false;// this make that he will spawn when a house is available
        }



        public override string TownNPCName()
        {                                        //NPC names
            switch (WorldGen.genRand.Next(8))
            {
                case 0:
                    return "John";
                case 1:
                    return "Ephraim";
                case 2:
                    return "Andrew";
                default:
                    return "Sam";
                case 3:
                    return "Dave";
                case 4:
                    return "Hunter";
                case 5:
                    return "Eric";
                case 6:
                    return "Carl";
            }
        }




        public override string GetChat()
        {                                             //npc chat
      
            switch (Main.rand.Next(3))
            {
                case 0:
                    return "Please defend me, I'm just a kid. I can't defend myself, so these walls better be safe.";
                case 1:
                    return "People judge me for being a kid. Atleast you accept me, right?";
                default:
                    return "What time is it? I don't know, do YOU know?";
                case 2:
                    return "I have found the greatest treasures in the land! What? You want some?";
                case 3:
                    return "Huh? You think I'm amazing? Such happy.";
                case 4:
                    return "It's a beautiful day... or night.";
            }
        }

        public override void SetChatButtons(ref string button, ref string button2)
        {
            button = Lang.inter[28];
        }

        public override void OnChatButtonClicked(bool firstButton, ref bool shop)
        {
            if (firstButton)
            {
                shop = true;
            }
        }

        public override void SetupShop(Chest shop, ref int nextSlot)
        {
            shop.item[nextSlot].SetDefaults(mod.ItemType(null, "GrabBag"));
        }

    }
}

I copied my tmod players to vanilla players and it's still empty
 
I don't know why, but whenever I try to launch the ModReader it doesn't open. It acts like it will , I type in the admin password, wait like ten minutes, and it does nothing. Any ideas?
 
I don't know why, but whenever I try to launch the ModReader it doesn't open. It acts like it will , I type in the admin password, wait like ten minutes, and it does nothing. Any ideas?
It's pretty much instantaneous. Either open a cmd window (Shift right click in File Explorer, open command window here is a nice shortcut to know) and launch from there if you'd like to read it's output, or check the log file.

So, I'm not sure if something is acting up on the server browser, but I seem to be having trouble publishing my mod.
Code:
Timeout dell'operazione.
  in System.Net.HttpWebRequest.GetResponse()
  in Terraria.ModLoader.IO.UploadFile.UploadFiles(String address, IEnumerable`1 files, NameValueCollection values)
  in Terraria.ModLoader.UI.UIModSourceItem.Publish(UIMouseEvent evt, UIElement listeningElement)
Around this time of day the server gets overloaded. I'm looking into solutions, but check the file size of the tmod file and try publishing when the mod browser isn't at it's peak.

public override bool CanTownNPCSpawn(14 (numTownNPCs), 500000 (money))
This is a syntax error.

Hi!!! So in my players folder for tmodloader, it is empty, but the game has my player in the game and I can play it, but then when i play vanilla terraria, my player is gone and the players folder is still empty. I don't know what is going but I would really like some help!!!

Ask me if you need any pictures!!!
Thanks for helping!!!

-Enderplayz

P.S, I put my vanilla players in my modloader player folder if this information helps!
Show some pictures with the file path shown.
 
It's pretty much instantaneous. Either open a cmd window (Shift right click in File Explorer, open command window here is a nice shortcut to know) and launch from there if you'd like to read it's output, or check the log file.


Around this time of day the server gets overloaded. I'm looking into solutions, but check the file size of the tmod file and try publishing when the mod browser isn't at it's peak.


This is a syntax error.


Show some pictures with the file path shown.

What do you mean "File path?"
 
Around this time of day the server gets overloaded. I'm looking into solutions, but check the file size of the tmod file and try publishing when the mod browser isn't at it's peak.
What is the file size limit? Supposing there's one of course. The .tmod file is currently 8-9 MBs.

EDIT: tried to publish again after half a day, still the same issue.
 
Last edited:
c:\Users\Anon\Documents\My Games\Terraria\ModLoader\Mod Sources\TheOmegaMod\Items\Buffs\SoulBuff.cs(28,13) : error CS0246: The type or namespace name 'ExamplePlayer' could not be found (are you missing a using directive or an assembly reference?) im helping a friend and we got an error from having Example player and not having it
 
I'm going to request that when you click the 'Publish' button, that tModLoader asks you if you are sure. I ask this as I pressed it by mistake, but was saved by the fact I forgot to change the version number. (The update I just released (2.6.1) was intentional, but I nearly published lots of the next big update (?.?.?) by mistake)

EDIT: Or you could have an option in the build.txt file: 'devBuild'. If:
Code:
devBuild = true
then tModLoader shouldn't let you publish it.
 
Last edited:
You know, at the top of the file explorer, it says something like c:/User/blah/Terraria/ModLoader/players

Oh. Yeah here you go:
Untitled.png


EDIT: I use a Mac if that helps you
 
Last edited:
Oh :red: I see the syntax error now :p
I'm a :red:. Too many ()s. Well I'm not trying to publish it YET... I may delete idfk
[doublepost=1471471985,1471471910][/doublepost]oh wait thats someone else :redmunch:
[doublepost=1471472087][/doublepost]OH btw, got the code from Al0n37. How would I set the money and maxtownnpcs?
:p
 
Will you ever put up a mirror link for the downloads. Not all of us can use Mediafire without the page refreshing and the download never downloading.
 
Back
Top Bottom