Standalone [1.3] tModLoader - A Modding API

@imkSushi
On those questions:

1) Is there any way to set up a poll someplace for that? Speaking only for my own usage, I know that when I go in to download or update mods, many of the larger ones respond with a "server busy" reply and I have to go to the manual download point to update.

2) I would think more redundancy in the download system would be a good thing.
No point trying, I've talked to Jofairden and raydeejay on the tml Discord chat. They are both completely closed to any idea. Jopo and Bluemagic, I don't know about, but...
 
My friend can't install tmodloader because it says that the file is dangerous and automatically deletes it.
Someone please help!
 
Hm, that's weird; those files are required for Terraria to run.
I think I know what might be happening, although I won't be able to test it until I get back. Are those files absent from the directory that contains your Terraria.exe?
I also have a problem that says

"System.EntryPointNotFoundEsception: Unable to find an entry point named 'Init' in DLL 'CSteamworks'.
at Steamworks.NativeMethos.SteamAPI_Init()
at Terraria.Social.Steam.CoreSocialModulr.Initialize()
at Terraria.Social.SocialAPI.Initialize(Nullable 1 mode)
at Terraria.Program.LaunchGame(String[] args, Bolean monoArgs)"
[doublepost=1499293077,1499292648][/doublepost]
v0.1 is now uploaded. I had to rush through this since I'm leaving on vacation today, but it includes support for building and loading/reloading mods, adding recipes, and adding basic items. The main reason I put up an upload today is that thanks to my vacation, I will be unable to upload anything for an entire week. I will return on July 15, but hopefully I will be able to keep checking on here to see any feedback or bugs.

Also note that the next version will have a vastly improved interface. I will admit the current interface kind of sucks; that's what happens when I rush too much :confused:
Hm, that's weird; those files are required for Terraria to run.
I think I know what might be happening, although I won't be able to test it until I get back. Are those files absent from the directory that contains your Terraria.exe?


When i tried in stalling this happened

"System.EntryPointNotFoundEsception: Unable to find an entry point named 'Init' in DLL 'CSteamworks'.
at Steamworks.NativeMethos.SteamAPI_Init()
at Terraria.Social.Steam.CoreSocialModulr.Initialize()
at Terraria.Social.SocialAPI.Initialize(Nullable 1 mode)
at Terraria.Program.LaunchGame(String[] args, Bolean monoArgs)"

I've tried everything to fix it,and tried to reinstall but when i put the Tmod loader files into the the 'Terraria' file it just happens again
 
I cant get my mods working proerply. Its always a dice roll. I had a bunch of them enabled and it didnt have any errors but when I created the world, the game just crashed. So I removed some of the mods and then it started giving me errors like failing to load a mp3 on spirit, Calamity ETC. So I thought maybe ill reenable them and jsut try create the world again. But it gave more errors on the mods that gave no errors before. Waht do I do?
 
I also have a problem that says

"System.EntryPointNotFoundEsception: Unable to find an entry point named 'Init' in DLL 'CSteamworks'.
at Steamworks.NativeMethos.SteamAPI_Init()
at Terraria.Social.Steam.CoreSocialModulr.Initialize()
at Terraria.Social.SocialAPI.Initialize(Nullable 1 mode)
at Terraria.Program.LaunchGame(String[] args, Bolean monoArgs)"
[doublepost=1499293077,1499292648][/doublepost]



When i tried in stalling this happened

"System.EntryPointNotFoundEsception: Unable to find an entry point named 'Init' in DLL 'CSteamworks'.
at Steamworks.NativeMethos.SteamAPI_Init()
at Terraria.Social.Steam.CoreSocialModulr.Initialize()
at Terraria.Social.SocialAPI.Initialize(Nullable 1 mode)
at Terraria.Program.LaunchGame(String[] args, Bolean monoArgs)"

I've tried everything to fix it,and tried to reinstall but when i put the Tmod loader files into the the 'Terraria' file it just happens again

Your Issue is the exact same as mine.
 
Can somebody help me? I'm making a projectile and I want to have it animated. Ive put 2 pixels in between each projectile like you would a custom enemy and soul.
 

Attachments

  • HellishProjectile.png
    HellishProjectile.png
    1.2 KB · Views: 140
Is there any list of item parameters, like player.meleeDamage, player.lifeRegen, so i can make different armor/accesories easily?
 
I meant like changing "item.name = <NameIfItem>;" to "DisplayName.SetDefault("<NameOfItem");", or "item.toolTip = <ToolTip>" to "Tooltip.SetDefault("<FirstLine.>\n<SecondLine.>"); , etc.
The Migration Guide tells you what you need to change. :p
wait... do i really need to do all of this just to update my tmodloader from v0.10.0.1 to v0.10.0.2 Ps: I'm on mac
 
wait... do i really need to do all of this just to update my tmodloader from v0.10.0.1 to v0.10.0.2 Ps: I'm on mac
Yes. The more lines you need to change, the more time-consuming it is, obviously. Which kind of sucks. :red:
You're on Mac? Well, I only know doing what I said works on Windows, but I don't know about Mac, sorry 'bout that. :I
 
I think I've asked this before but anyways, will my stuff from other mods will disappear forever when I disable the mod?

Like I disable Calamity and all of my stuff from Calamity will be gone???
 
Tyring to make a Flail Weapon, and I get this error:
c:\Users\Joshua\Documents\My Games\Terraria\ModLoader\Mod Sources\JoshuasMod\Projectiles\TyrhungBlade.cs(24,13) : error CS0246: The type or namespace name 'Texture2D' could not be found (are you missing a using directive or an assembly reference?)

c:\Users\Joshua\Documents\My Games\Terraria\ModLoader\Mod Sources\JoshuasMod\Projectiles\TyrhungBlade.cs(52,131) : error CS0103: The name 'SpriteEffects' does not exist in the current context
Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace JoshuasMod.Projectiles
{
    public class TyrhungBlade : ModProjectile
    {
        public override void SetDefaults()
        {
            projectile.width = 34;
            projectile.height = 34;
            projectile.friendly = true;
            projectile.penetrate = -1; // Penetrates NPCs infinitely.
            projectile.melee = true; // Deals melee damage.
            projectile.aiStyle = 15; // Set the aiStyle to that of a Flail.
        }

        //The "Chain" for the Flail Weapon.
        public override bool PreDraw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, Color lightColor)
        {
            Texture2D texture = ModLoader.GetTexture("JoshuasMod/Projectiles/TyrhungChain");

            Vector2 position = projectile.Center;
            Vector2 mountedCenter = Main.player[projectile.owner].MountedCenter;
            Microsoft.Xna.Framework.Rectangle? sourceRectangle = new Microsoft.Xna.Framework.Rectangle?();
            Vector2 origin = new Vector2((float)texture.Width * 0.5f, (float)texture.Height * 0.5f);
            float num1 = (float)texture.Height;
            Vector2 vector2_4 = mountedCenter - position;
            float rotation = (float)Math.Atan2((double)vector2_4.Y, (double)vector2_4.X) - 1.57f;
            bool flag = true;
            if (float.IsNaN(position.X) && float.IsNaN(position.Y))
                flag = false;
            if (float.IsNaN(vector2_4.X) && float.IsNaN(vector2_4.Y))
                flag = false;
            while (flag)
            {
                if ((double)vector2_4.Length() < (double)num1 + 1.0)
                {
                    flag = false;
                }
                else
                {
                    Vector2 vector2_1 = vector2_4;
                    vector2_1.Normalize();
                    position += vector2_1 * num1;
                    vector2_4 = mountedCenter - position;
                    Microsoft.Xna.Framework.Color color2 = Lighting.GetColor((int)position.X / 16, (int)((double)position.Y / 16.0));
                    color2 = projectile.GetAlpha(color2);
                    Main.spriteBatch.Draw(texture, position - Main.screenPosition, sourceRectangle, color2, rotation, origin, 1f, SpriteEffects.None, 0.0f);
                }
            }
            return true;
        }
    }
}
I'm probably doing it the "Pre-v0.10.0.1" way. :I
Either way, how do I fix this?
 
Tyring to make a Flail Weapon, and I get this error:
c:\Users\Joshua\Documents\My Games\Terraria\ModLoader\Mod Sources\JoshuasMod\Projectiles\TyrhungBlade.cs(24,13) : error CS0246: The type or namespace name 'Texture2D' could not be found (are you missing a using directive or an assembly reference?)

c:\Users\Joshua\Documents\My Games\Terraria\ModLoader\Mod Sources\JoshuasMod\Projectiles\TyrhungBlade.cs(52,131) : error CS0103: The name 'SpriteEffects' does not exist in the current context
Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace JoshuasMod.Projectiles
{
    public class TyrhungBlade : ModProjectile
    {
        public override void SetDefaults()
        {
            projectile.width = 34;
            projectile.height = 34;
            projectile.friendly = true;
            projectile.penetrate = -1; // Penetrates NPCs infinitely.
            projectile.melee = true; // Deals melee damage.
            projectile.aiStyle = 15; // Set the aiStyle to that of a Flail.
        }

        //The "Chain" for the Flail Weapon.
        public override bool PreDraw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, Color lightColor)
        {
            Texture2D texture = ModLoader.GetTexture("JoshuasMod/Projectiles/TyrhungChain");

            Vector2 position = projectile.Center;
            Vector2 mountedCenter = Main.player[projectile.owner].MountedCenter;
            Microsoft.Xna.Framework.Rectangle? sourceRectangle = new Microsoft.Xna.Framework.Rectangle?();
            Vector2 origin = new Vector2((float)texture.Width * 0.5f, (float)texture.Height * 0.5f);
            float num1 = (float)texture.Height;
            Vector2 vector2_4 = mountedCenter - position;
            float rotation = (float)Math.Atan2((double)vector2_4.Y, (double)vector2_4.X) - 1.57f;
            bool flag = true;
            if (float.IsNaN(position.X) && float.IsNaN(position.Y))
                flag = false;
            if (float.IsNaN(vector2_4.X) && float.IsNaN(vector2_4.Y))
                flag = false;
            while (flag)
            {
                if ((double)vector2_4.Length() < (double)num1 + 1.0)
                {
                    flag = false;
                }
                else
                {
                    Vector2 vector2_1 = vector2_4;
                    vector2_1.Normalize();
                    position += vector2_1 * num1;
                    vector2_4 = mountedCenter - position;
                    Microsoft.Xna.Framework.Color color2 = Lighting.GetColor((int)position.X / 16, (int)((double)position.Y / 16.0));
                    color2 = projectile.GetAlpha(color2);
                    Main.spriteBatch.Draw(texture, position - Main.screenPosition, sourceRectangle, color2, rotation, origin, 1f, SpriteEffects.None, 0.0f);
                }
            }
            return true;
        }
    }
}
I'm probably doing it the "Pre-v0.10.0.1" way. :I
Either way, how do I fix this?

A quick reminder to everyone that the discord channel is pretty much where most help can be found.

For this, you are missing a using statement, Texture2D is in Microsoft.Xna.Framework.Graphics I believe.
 
A quick reminder to everyone that the discord channel is pretty much where most help can be found.

For this, you are missing a using statement, Texture2D is in Microsoft.Xna.Framework.Graphics I believe.
Thanks for the heads-up about the Discord Channel, JopoJelly. :) Either I forgot that it existed, or I'm just blind. I'll pick the latter. Thanks for the help. :3
 
I don't know why, but Terraria crashes when it loads my mod, even though there's almost nothing in it, what's causing this problem? I would put a folder there, except I don't know how to. :I
 
Yes. The more lines you need to change, the more time-consuming it is, obviously. Which kind of sucks. :red:
You're on Mac? Well, I only know doing what I said works on Windows, but I don't know about Mac, sorry 'bout that. :I
I just wish someone would make a vid on how to update tmodloader Windows AND Mac, but we all know that no one ever makes tutorials on mac, but whatever I will find a way to update my tmodloader and if i can't find anything I will just erase my v0.10.0.1 tmodloader and replace it with the v0.10.0.2 tmodloader...

PS: Thanks for you'r help :D
 
I just wish someone would make a vid on how to update tmodloader Windows AND Mac, but we all know that no one ever makes tutorials on mac, but whatever I will find a way to update my tmodloader and if i can't find anything I will just erase my v0.10.0.1 tmodloader and replace it with the v0.10.0.2 tmodloader...

PS: Thanks for you'r help :D
i on mac too. i just downloaded new version , opened it , and all works just fine.
 
Back
Top Bottom