Standalone [1.3] tModLoader - A Modding API

How would I get an enemy to fire three projectiles in a row like a harpy?
Basically trigger your call to Projectile.NewProjectile at certain times and reset your timer after a break.

For example, the Harpy code uses ai[0] as a timer. Each frame, it is incremented. At 30,60,and 90, it shoots if it can. At about 400, it resets ai[0] back to 0.

Here is a snippet to show it.
Code:
                        this.ai[0] += 1f;
                        if (this.ai[0] == 30f || this.ai[0] == 60f || this.ai[0] == 90f)
                        {
                            if (Collision.CanHit(this.position, this.width, this.height, Main.player[this.target].position, Main.player[this.target].width, Main.player[this.target].height))
                            {
                                float num624 = 6f;
                                Vector2 vector65 = new Vector2(this.position.X + (float)this.width * 0.5f, this.position.Y + (float)this.height * 0.5f);
                                float num625 = Main.player[this.target].position.X + (float)Main.player[this.target].width * 0.5f - vector65.X + (float)Main.rand.Next(-100, 101);
                                float num626 = Main.player[this.target].position.Y + (float)Main.player[this.target].height * 0.5f - vector65.Y + (float)Main.rand.Next(-100, 101);
                                float num627 = (float)Math.Sqrt((double)(num625 * num625 + num626 * num626));
                                num627 = num624 / num627;
                                num625 *= num627;
                                num626 *= num627;
                                int num628 = 15;
                                int num629 = 38;
                                int num630 = Projectile.NewProjectile(vector65.X, vector65.Y, num625, num626, num629, num628, 0f, Main.myPlayer, 0f, 0f);
                                Main.projectile[num630].timeLeft = 300;
                            }
                        }
                        else if (this.ai[0] >= (float)(400 + Main.rand.Next(400)))
                        {
                            this.ai[0] = 0f;
                        }
 
How so? If there is a problem, it would be great if someone told the developers.
A few of the things i have experienced as well as other people saying that they have on the thread, is crashing(On start up you lucky if you can get it to start), mods taking at least an hour to download, generating world can cause crashing, antivirus issue, multiple errors and lag in game with and with out frame skip on.
 
A few of the things i have experienced as well as other people saying that they have on the thread, is crashing(On start up you lucky if you can get it to start), mods taking at least an hour to download, generating world can cause crashing, antivirus issue, multiple errors and lag in game with and with out frame skip on.
so I'm gonna comment on these here goes :
**mods taking an hour to download => I didn't experience this one, but I had the "start mod browser, whole terraria frozen, need to kill the process" I guess it's all related to the mod browser being beta, which if you don't know means it's unfinished.
**generating world crash => are you sure you had 800 or less chests while generating world ? cause that's a known issue, and game engine related, not sure how fixable it would be.
**antivirus issue => that's the antivirus virus algorithm problem, report the false positive to them & add files to exception list.
 
A few of the things i have experienced as well as other people saying that they have on the thread, is crashing(On start up you lucky if you can get it to start), mods taking at least an hour to download, generating world can cause crashing, antivirus issue, multiple errors and lag in game with and with out frame skip on.
I've found that if the game starts to run at half speed, I can fix it by Alt Tabbing to desktop, then click on the game again and it runs at normal speed again. I had the same problem in tAPI, so it may be a problem in Terraria itself that's triggered by the modding API.
 
tModLoader uses its own separate worlds and players. Don't worry, your old worlds and players are fine!
You can find them at Documents\My Games\Terraria\Players (For Players)
And... Documents\My Games\Terraria\Worlds (For Worlds)
No problem, found out it was the wrong user i was on.
 
so I'm gonna comment on these here goes :
**mods taking an hour to download => I didn't experience this one, but I had the "start mod browser, whole terraria frozen, need to kill the process" I guess it's all related to the mod browser being beta, which if you don't know means it's unfinished.
**generating world crash => are you sure you had 800 or less chests while generating world ? cause that's a known issue, and game engine related, not sure how fixable it would be.
**antivirus issue => that's the antivirus virus algorithm problem, report the false positive to them & add files to exception list.

I know what beta means and I get it is in beta but, it is still a bug either way. My antivirus dose not detect it as a virus, most of the things i said i do not experience but i found people have so i just told the devloper.
 

i made a video about tmodloader , i know the grammar isnt the best , i apologize for that and also for the bad mic quality , plesae bear with me until i get a new mic
 

i made a video about tmodloader , i know the grammar isnt the best , i apologize for that and also for the bad mic quality , plesae bear with me until i get a new mic
Are you pop filtering and recording with low reverb?
i would know, but my headset completely died a few minuites ago, so I can't hear :red:
 
I know what beta means and I get it is in beta but, it is still a bug either way. My antivirus dose not detect it as a virus, most of the things i said i do not experience but i found people have so i just told the devloper.
then any person that reports to you that it is detected as a virus, you should tell them to put it in exceptions & report to the antivirus maker, it is not something that the developers can fix nor should he try to take special measures to make it undetected. So there's no reasons to tell this to the dev. Thank you.
[doublepost=1477626049,1477625889][/doublepost]

i made a video about tmodloader , i know the grammar isnt the best , i apologize for that and also for the bad mic quality , plesae bear with me until i get a new mic
To be honest, the mic quality is slightly bad buuuut, I've heard far worse and your video is fully understandable by me (not an english native speaker). so kudos for making a tutorial :)
 
hi, Is there a command that allows verifying the enabled mods on a running tmodloader server ? thanks

another one :
question : I renamed my original terraria.exe to terraria.ori.exe, and it works this way, I can launch vanilla terraria this way.
so this makes me wonder why does tmodloader just overwrites terraria ?
 
Last edited:
Sorry?
upload_2016-10-28_19-20-5.png
 
Hi! Today I found a weird bug with candelabras. I crafted a palm ood candelabra, but when I wanted to place it, it turned into... mushroom candelabra
21lk9rn.jpg

When I placed it, it indeed was a mushroom candelabra, and it dropped the mushroom candelabra after breaking. Then placing it made this a boreal wood candelabra, which later turned into a slime candelabra, and so on. Additionally, a meteor candelabra can't be placed at all, instead it breaks instantly, dropping both marble and granite candelabra (placement preview showed some messed-up sprites of those two), and both cannot be placed, either breaking into nothing (granite) or being unplacable, showing only a trapezoid with a crystal block texture. I don't know what is causing that issue, i disabled every single mod and the bug still persisted.
Mods I am using (all updated, newest version of tModLoader)
Thorium
Tremor
Crystillium
Calamity
The YoYo Overload
More Accessories+
Pumpking's Mod
Which Mod is this from?
Here's another pic, showing the weird thing with marble candelabra (which is not placable at all)
5nqes4.png
 
Back
Top Bottom