Standalone [1.3] tModLoader - A Modding API

ALmaZss

Plantera
Allright, in this case 'player' was just an example of a Player class instance.
If you want to check the direction of the owner of the projectile in the SetDefaults function, something like this may work:
Code:
public override SetDefaults()
{
    Player p = Main.player[projectile.owner];
    if(p.direction == -1)
        // Do your left stuff.
    else
        // Do your right stuff.
}
Yes, it works, thank you
 

Iriazul

Terrarian
Just so I don't have to test everything again, this should make it so ore can't spawn in trees right?
Because ore runner allows ore to spawn in only specified tiles.

Code:
if (downedDesertScourge)
{
for (int k = 0; k < (int)((double)(Main.maxTilesX * Main.maxTilesY) * 15E-05); k++)
{
int i2 = WorldGen.genRand.Next(0, Main.maxTilesX);
int j2 = WorldGen.genRand.Next((int)(Main.maxTilesY * .2f), (int)(Main.maxTilesY * .8f));
WorldGen.OreRunner(i2, j2, (double)WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(3, 6), (ushort)mod.TileType("AerialiteOre"));
}
}
I've been using OreRunner and never had the problem of ore spawning in trees so yeah, this should work (if there are no errors of course).
 

Iriazul

Terrarian
Just a quick question to confirm my assumption:
A method when placing a tile is absent, right? I want to use the coordinates of the newly placed tile, so if my assumption is correct, I'm guessing I'll have to do the tile placement manually and go from there?
How can I make the projectile spin during flight?
You could try something like the following:
Code:
public override bool PreUpdate()
{
    projectile.rotation += 0.1F * projectile.direction;
    return false;
}

<<< EDIT >>>
Nevermind my question, I think the placement of Chests has answered it.
 
Last edited:

ALmaZss

Plantera
Just a quick question to confirm my assumption:
A method when placing a tile is absent, right? I want to use the coordinates of the newly placed tile, so if my assumption is correct, I'm guessing I'll have to do the tile placement manually and go from there?

You could try something like the following:
Code:
public override bool PreUpdate()
{
    projectile.rotation += 0.1F * projectile.direction;
    return false;
}
Doesn't work
 
So I suppose the real question here is: is it possible to change the color of an armor piece without changing the color of nearby accessories? It feels like it should, since the game already seems to do that with dressers.
I really, really want to know this. I even tried messing with Main.playerDrawData and no luck.
[doublepost=1465738044,1465738004][/doublepost]
I should have known...
[doublepost=1465737970,1465737795][/doublepost]Is there way to change properties of existing item?
Check the documentation for GlobalItem.
 

sojettlag

Terrarian
So I downloaded the GOG Windows version of the tModLoader. It contains this files.
GOG tmod.png


I don't know how to install it. I tried following the README.txt instructions but whenever I try to run terraria, it doesn't start and shows this.
GOG tmod.png


I have downloaded the GOG 1.3.1 version of terraria previously. I wanted to install the Thorium mod but it requires the tModLoader first. Any advice? Thanks.
[doublepost=1465738376,1465738148][/doublepost]
where are enough tutorials on youtube for these
Sorry bout that but I can't seem to find any tutorial on installing the tModLoader for GOG version in youtube.
 

Lukas04

Official Terrarian
So I downloaded the GOG Windows version of the tModLoader. It contains this files.View attachment 117367

I don't know how to install it. I tried following the README.txt instructions but whenever I try to run terraria, it doesn't start and shows this.
View attachment 117368

I have downloaded the GOG 1.3.1 version of terraria previously. I wanted to install the Thorium mod but it requires the tModLoader first. Any advice? Thanks.
[doublepost=1465738376,1465738148][/doublepost]
Sorry bout that but I can't seem to find any tutorial on installing the tModLoader for GOG version in youtube.
I only remember that Bluemagic postet an Mini-Tutorial in the thread
I can try to search for it C:
 

Marcin JOT.PE

Terrarian
Can someone explain the custom boss AI.
Link some tutorial of send some example with explained what do all things or some help because i need ai that fallow the player from the sky and shoot to him and some times charge him like queen bee but if I use ai style queen bee he shoot with bees en some green things.
 

Iriazul

Terrarian
Can someone explain the custom boss AI.
Link some tutorial of send some example with explained what do all things or some help because i need ai that fallow the player from the sky and shoot to him and some times charge him like queen bee but if I use ai style queen bee he shoot with bees en some green things.
Programming AI requires an in-depth understanding of (in this case) C#.
Explaining another boss' AI could help, but you'll always need to make adjustments to fit your own boss.
Try taking a look at some of the vanilla mob AI, since boss AI is generally more complicated.
Also try to make some sort of flowchart or documentation on how you want your boss to act. Believe me, that'll make programming your boss way easier.
If you can supply at least some explanation (hovers at the same height above the player? Shoots every 3 seconds, that kind of stuff) I could try writing some basic AI fitting those requirements and give an explanation of that. I think that together with your boss documentation would teach you more than explaining a the AI of a pre-existing boss.
 

Lukas04

Official Terrarian
So I downloaded the GOG Windows version of the tModLoader. It contains this files.View attachment 117367

I don't know how to install it. I tried following the README.txt instructions but whenever I try to run terraria, it doesn't start and shows this.
View attachment 117368

I have downloaded the GOG 1.3.1 version of terraria previously. I wanted to install the Thorium mod but it requires the tModLoader first. Any advice? Thanks.
[doublepost=1465738376,1465738148][/doublepost]
Sorry bout that but I can't seem to find any tutorial on installing the tModLoader for GOG version in youtube.

Thats here what Blue said
The GOG version for Windows has now been released for v0.8.1.2! Huge thanks to @Jeckel for making the GOG version possible!

In order to make sure only people who have purchased Terraria can play tModLoader, the installation process for the GOG version is the same as when tModLoader was first released. You will need to put your exe files in a Vanilla folder, then run the Patch.bat file in order to create your tModLoader exe files.
 

sojettlag

Terrarian
It still won't work. I tried redownloading the tModLoader but got the same results. It produces a terraria.exe and a tModLoaderServer.exe but still says its not a valid win32 application.
 

Lukas04

Official Terrarian
It still won't work. I tried redownloading the tModLoader but got the same results. It produces a terraria.exe and a tModLoaderServer.exe but still says its not a valid win32 application.
I dont know what to do too,sry thats was the only thing i found
 
Top Bottom