Endershot355
Steampunker
How do I search
Ctrl+FHow do I search
What do I search for, constant, whatever?Ctrl+F
Count the { }. You aren't closing the namespacePlease, tell me what I did wrong.
Hey, I did everything what you said. I set up a VS project and all. But it still won't show me all available methods and variables via '.'. It also highlights all Terraria-related existing methods and libraries. The mod itself has only one item so far, and Terraria managed to compile it without errors, but nothing is working. (I added a simple recipe: a helm (6 wood). It doesn't appear as a craftable item)Check here to see how to setup your project in Visual Studio, that may get you going.
Just like the example mod volcano code.How does Terraria make the falling stars projectile fall from the sky randomly?
Did you reference vanilla or tmodloader. Do you have a class that extends mod. Did you override setmodinfo and set autoload to true. Did you make sure to override virtual methods.Hey, I did everything what you said. I set up a VS project and all. But it still won't show me all available methods and variables via '.'. It also highlights all Terraria-related existing methods and libraries. The mod itself has only one item so far, and Terraria managed to compile it without errors, but nothing is working. (I added a simple recipe: a helm (6 wood). It doesn't appear as a craftable item)
All you need to understand is that steam will launch "Terraria.exe". You can rename one or the other. If you want to switch between them, you could just directly open the exe instead of launching through steam. Maybe you'll want to make a desktop shortcut to the one that isn't named Terraria.exe for your convenienceHey, I can't get back to non-modded Terraria because when I launch Terraria from Steam, it says that it's the tModLoader version. The only thing I could think of was to rename the program (the one named Terraria with the jungle tree, right?), but that didn't help. Do you know something I could do to fix it?
EDIT: Fixed it!
Apparently I had to move the tModLoader files out of the Terraria folder and add specifically the Terraria executable (just to make sure it can't run something else) and play it from the exe!
SECOND EDIT: but now I can't get back to the tModLoader
:/ w/e
For the autocompletion: If all's well, you should have some sort of folder in your mod project called 'References...' Right-click that, select 'Add Reference...' and select browse. Now look for the tModLoader Terraria.exe file (inside your steam folder and all) and add that as a reference (now autocomplete should work).Hey, I did everything what you said. I set up a VS project and all. But it still won't show me all available methods and variables via '.'. It also highlights all Terraria-related existing methods and libraries. The mod itself has only one item so far, and Terraria managed to compile it without errors, but nothing is working. (I added a simple recipe: a helm (6 wood). It doesn't appear as a craftable item)
Now you want to study the code that's used for that AI style and apply it to your own NPC.I got to the AI style == 6 what now
I srsy cant find where it begins or ends thouNow you want to study the code that's used for that AI style and apply it to your own NPC.
Have you found an if statement like 'if(this.aisStyle == 6)'?I srsy cant find where it begins or ends thou
This small thing?Have you found an if statement like 'if(this.aisStyle == 6)'?
In that if statement is the code you'll want to work with.
I'm afraid not...This small thing?
if (this.aiStyle == 6)
{
for (int k = (int)this.ai[0]; k > 0; k = (int)Main.npc[k].ai[0])
{
if (Main.npc[k].active)
{
Main.npc[k].active = false;
if (Main.netMode == 2)
{
Main.npc[k].life = 0;
Main.npc[k].netSkip = -1;
NetMessage.SendData(23, -1, -1, "", k, 0f, 0f, 0f, 0, 0, 0);
}
}
}
}
That should not be necessary.DO I REALLY HAVE TO DECOMPILE EVERY SINGLE TIME!?
Screw it, Im not going to do it again. My computer overheats and i really dont want to damage it.That should not be necessary.
After decompiling the NPC class, I just copied it all and put it in a seperate .cs file to look through using notepad++ (which is waaaay faster than decompiling again).
Click the save code button and it will save it as a visual studio project.DO I REALLY HAVE TO DECOMPILE EVERY SINGLE TIME!?