Standalone [1.3] tModLoader - A Modding API

When i'm shooting my new arrow type out of the phantasm bow it doesn't seem to shoot the homing arrows it shoots when an arrow shot out a phantasm hits an enemy. How do I fix this?
 
Allright... I've got just one more question... When talking to a NPC there is a 'Close' button by default. Is there any way to check if that button has been clicked (or even better: a way to remove that button)? Ty in advance.
I'd need to add more hooks for that in order to be possible. What exactly are you trying to do?

So could this work like tapi and tconfig to download mods people have created and play or is it just a mod creator?
Just like with tapi and tconfig, it lets you both create mods and play mods other people made.

Is this mac compatible?
I plan for the next version to be mac-compatible.

When i'm shooting my new arrow type out of the phantasm bow it doesn't seem to shoot the homing arrows it shoots when an arrow shot out a phantasm hits an enemy. How do I fix this?
That's intended behavior of the Phantasm Bow.

Terraria.exe is not a Win32 compatible application? Any fix? Or am I dumb and blind as a batman?
First of all, try making sure that the installation went correctly. If that still doesn't work, try re-downloading a fresh copy of Terraria from Steam then try patching that.
 
I'd need to add more hooks for that in order to be possible. What exactly are you trying to do?


Just like with tapi and tconfig, it lets you both create mods and play mods other people made.


I plan for the next version to be mac-compatible.


That's intended behavior of the Phantasm Bow.


First of all, try making sure that the installation went correctly. If that still doesn't work, try re-downloading a fresh copy of Terraria from Steam then try patching that.
Tell me when it is mac plse
 
First of all, try making sure that the installation went correctly. If that still doesn't work, try re-downloading a fresh copy of Terraria from Steam then try patching that.
There is no way I wouldn't have tried everything that came to mind less than 4 times, those two things came first, then i tried making it administrator, and changing what it should be running as in compatible mode. But the terraria.exe it creates, while dragged in my terraria folder it shows as an actual .exe file image, not the terraria tree logo or anything special which definitely has something to do with it, it also has the gold lock in the bottom left of the icon which i don't have any idea how to get rid of, it shows up on other files i got from zipped folders, and they wont work at all. I use winrar
 
There is no way I wouldn't have tried everything that came to mind less than 4 times, those two things came first, then i tried making it administrator, and changing what it should be running as in compatible mode. But the terraria.exe it creates, while dragged in my terraria folder it shows as an actual .exe file image, not the terraria tree logo or anything special which definitely has something to do with it, it also has the gold lock in the bottom left of the icon which i don't have any idea how to get rid of, it shows up on other files i got from zipped folders, and they wont work at all. I use winrar
Hm... you might have to right-click every file in the download, view their properties, then unblock them. If that still doesn't work or you've already done that, can you view the properties for the modded exe then tell me the file size?

It might not be for a while since school started and I don't know if he even has a Mac.
I do have an old Mac; I'm in the middle of fixing all the recompile errors for the Mac version right now. Unfortunately, for whatever reason the Mac version has like 1000+ recompile errors (the Windows version only has 300) so yeah, it might take a while.
 
Hm... you might have to right-click every file in the download, view their properties, then unblock them. If that still doesn't work or you've already done that, can you view the properties for the modded exe then tell me the file size?
Un-block? I don't see anything relative to that in properties. This pc is pretty old but my OS is still windows 7...
 
It does say anywhere that any file was blocked due to being downloaded from the Internet?
Extracted file:
a38728055b02aca01919fee7caa4b663.png


Inside of extracted file + custom bat file:
eb39609e25a3c65a6961e8e190aa4285.png


Generated .exe file from code:
eefa93fce7de456a81aa00982a7d1f83.png


Final product in (super sloppy) Terraria folder:
c06a37da9bc8e2d389ef2cdf9d4e0c3f.png
EDIT: aaaand all the images are broken... but not in the messages editor... strange.
 
Extracted file:
a38728055b02aca01919fee7caa4b663.png


Inside of extracted file + custom bat file:
eb39609e25a3c65a6961e8e190aa4285.png


Generated .exe file from code:
eefa93fce7de456a81aa00982a7d1f83.png


Final product in (super sloppy) Terraria folder:
c06a37da9bc8e2d389ef2cdf9d4e0c3f.png
EDIT: aaaand all the images are broken... but not in the messages editor... strange.
Hm, it's weird that that golden lock appears magically just by copying the modded Terraria.exe. What is the exact file size of your modded Terraria.exe?
 
I do not have ILSpy, but it's alright, I'm sure when t-modloader is in its full release i will be able to make it work
 
How do you add dust to wings while flying - say, jetpack esque?
Try this, replacing ????s with real values and BoosterSmoke with your mod dust, or with a vanilla dust. For a jetpack, you might also want to give the dust some y velocity and a little x velocity based on
Code:
public override void WingUpdate(Player player, bool inUse)
{
    if (inUse || player.jump > 0)
    {
        int dust = ModDust.NewDust(new Vector2(????, ???), 8, 8, mod, "BoosterSmoke");
    }
}

If you are interested, this is the Booster v0.8 code from one of my mods, it acts just like a jetpack. Notice that some of the code is superfluous as I adapted it from Vanilla Jetpack code and didn't care to change it.
Code:
public override void WingUpdate(Player player, bool inUse)
        {
           // ErrorLogger.Log("WingUpdate");
            if (inUse || player.jump > 0)
            {
                player.rocketDelay2--;
                if (player.rocketDelay2 <= 0)
                {
                    Main.PlaySound(2, Style: mod.GetSoundSlot(SoundType.Item, "Sounds/Item/BoosterSound"));
                    //Main.PlaySound(2, (int)player.position.X, (int)player.position.Y, 13);
                    player.rocketDelay2 = 10;
                }
                int num84 = 2;
                if (player.controlUp)
                {
                    num84 = 4;
                }
                num84 = 1;
                for (int num85 = 0; num85 < num84; num85++)
                {
                //    int type = 6;
                    if (player.head == 41)
                    {
                        int arg_5D0E_0 = player.body;
                    }
                    float scale = 1.75f;
                    int alpha = 100;
                    float x3 = player.position.X + (float)(player.width / 2) + 16f;
                    if (player.direction > 0)
                    {
                        x3 = player.position.X + (float)(player.width / 2) - 26f;
                    }
                    float num86 = player.position.Y + (float)player.height - 18f;
                    if (num85 == 1 || num85 == 3)
                    {
                        x3 = player.position.X + (float)(player.width / 2) + 8f;
                        if (player.direction > 0)
                        {
                            x3 = player.position.X + (float)(player.width / 2) - 20f;
                        }
                        num86 += 6f;
                    }
                    if (num85 > 1)
                    {
                        num86 += player.velocity.Y;
                    }

                    int dust = ModDust.NewDust(new Vector2(x3, num86), 8, 8, mod, "BoosterSmoke");
                    Main.dust[dust].scale = 2;
                  //  Main.dust[dust].position = position - Main.dust[dust].scale * new Vector2(4, 4);

                  //  int num87 = Dust.NewDust(new Vector2(x3, num86), 8, 8, type, 0f, 0f, alpha, default(Color), scale);
                    Dust expr_5E21_cp_0 = Main.dust[dust];
                    expr_5E21_cp_0.velocity.X = expr_5E21_cp_0.velocity.X * 0.1f;
                    Main.dust[dust].velocity.Y = Main.dust[dust].velocity.Y * 1f + 2f * player.gravDir - player.velocity.Y * 0.3f;
                    Main.dust[dust].noGravity = true;
                 //   Main.dust[num87].shader = GameShaders.Armor.GetSecondaryShader(player.cWings, this);
                    if (num84 == 4)
                    {
                        Dust expr_5EB9_cp_0 = Main.dust[dust];
                        expr_5EB9_cp_0.velocity.Y = expr_5EB9_cp_0.velocity.Y + 6f;
                    }
                }
                player.wingFrameCounter++;
                if (player.wingFrameCounter > 4)
                {
                    player.wingFrame++;
                    player.wingFrameCounter = 0;
                    if (player.wingFrame >= 3)
                    {
                        player.wingFrame = 0;
                    }
                }
            }
            else if (!player.controlJump || player.velocity.Y == 0f)
            {
                player.wingFrame = 3;
            }
        }
 
I have a few questions; you know with projectiles like bullets how they create the tile they hit's dust when they hit a tile? like so:
THINGAH.gif
how do I make it do that with modded projectiles?
also I made a throwing-knife like item but when I use it I don't want it to appear in my hand, does anyone know how to do that?
 
Back
Top Bottom