• Journey's End on PC - Find info here and here. Please report bugs and issues for PC 1.4 and 1.4.1 to Re-Logic here.
  • Journey's End on Mobile - Find info here. Report bugs for Mobile 1.4 to DR Studios at this link and give as much detail as possible.
  • 1.4 will bring many changes to the PC version. We strongly advise making plans to back up your worlds and players prior to updating your game. More details here.
  • Console and Switch - The latest news can be found here. To report a bug, please use this link.

Standalone [1.3] tModLoader - A Modding API

Endershot355

Steampunker
0f, 0f, false, true); <---?
[DOUBLEPOST=1457437457,1457437423][/DOUBLEPOST]
Im getting an error here,
TileObjectData.newTile.Origin = new Point16(0, 3);

(23,49) : error CS0246: The type or namespace name 'Point16' could not be found (are you missing a using directive or an assembly reference?)

26,55) : error CS0246: The type or namespace name 'AnchorData' could not be found (are you missing a using directive or an assembly reference?)

(26,66) : error CS0103: The name 'AnchorType' does not exist in the current context
using terraria.AnchorType? idk
 

Eldrazi

Eater of Worlds
Im getting an error here,
TileObjectData.newTile.Origin = new Point16(0, 3);

(23,49) : error CS0246: The type or namespace name 'Point16' could not be found (are you missing a using directive or an assembly reference?)

26,55) : error CS0246: The type or namespace name 'AnchorData' could not be found (are you missing a using directive or an assembly reference?)

(26,66) : error CS0103: The name 'AnchorType' does not exist in the current context
Ah, you'll need to include these namespaces:
Code:
using Terraria;
using Terraria.ID;
using Terraria.Enums;
using Terraria.ModLoader;
using Terraria.ObjectData;
using Terraria.DataStructures;
0f, 0f, false, true); <---?
[DOUBLEPOST=1457437457,1457437423][/DOUBLEPOST]
using terraria.AnchorType? idk
The third and fourth, not the last four. Function parameters are split by ','.
 

Eldrazi

Eater of Worlds
can you just show me
It's not really all that hard:
Code:
WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int)WorldGen.worldSurfaceLow, Main.maxTilesY), (double)WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(2, 6), mod.TileType("EnderuimOre"), false, 0f, 0f, false, true);
                                                                                                                                    // ^^ This one                        // ^^ And this one
 

Endershot355

Steampunker
It's not really all that hard:
Code:
WorldGen.TileRunner(WorldGen.genRand.Next(0, Main.maxTilesX), WorldGen.genRand.Next((int)WorldGen.worldSurfaceLow, Main.maxTilesY), (double)WorldGen.genRand.Next(3, 6), WorldGen.genRand.Next(2, 6), mod.TileType("EnderuimOre"), false, 0f, 0f, false, true);
                                                                                                                                    // ^^ This one                        // ^^ And this one
thanks lol
Its works now
 

Iroh The Dragon

Terrarian
Im wanting to add a custom projectile to my boss, how would i go about this, im about to create the projectile, from the examplemod. Never done it before. i dont think.
 

Eldrazi

Eater of Worlds
Im wanting to add a custom projectile to my boss, how would i go about this, im about to create the projectile, from the examplemod. Never done it before. i dont think.
That really depends on the AI you want your projectile to have. It might be a good idea to look at how vanilla AI is handled.
 

Iroh The Dragon

Terrarian
That really depends on the AI you want your projectile to have. It might be a good idea to look at how vanilla AI is handled.
Im going to attempt to create a projectile which can be summonable and used with my custom weapons, then ill move onto looking into that and trying to add it to the boss as a minion.
 

Eldrazi

Eater of Worlds
Im going to attempt to create a projectile which can be summonable and used with my custom weapons, then ill move onto looking into that and trying to add it to the boss as a minion.
So you want to create a summonable minion, right?
Still, fleshing out what exactly the projectile is going to do is step one. After that, you'll really need some programming knowledge to piece a good AI together.
 

Eldrazi

Eater of Worlds
Yes sorry, like those.
The following code is how you animate an item:
Code:
public override DrawAnimation GetAnimation()
{
    return new DrawAnimationVertical(5, 8);
}
The first parameter (5) determines the speed at which the item animates (higher value = slower animation) and the second parameter (8) is the total amount of animation frames in your spritesheet.
 

Iroh The Dragon

Terrarian
What would i need to do if i wanted to add an item to 2 crafting stations / 2 tiles.
This is for one, recipe.AddTile(null, "Furnace");
How would i go about this ?
 

Eldrazi

Eater of Worlds
What would i need to do if i wanted to add an item to 2 crafting stations / 2 tiles.
This is for one, recipe.AddTile(null, "Furnace");
How would i go about this ?
Just call that function twice, but with the different tiles:
Code:
recipe.AddTile(null, "MyFurnace");
recipe.AddTile(null, "MyOtherThingYouNeedForThisRecipe");
 

Iroh The Dragon

Terrarian
The problem im having is with the custom 4x4. I need a 4w x 3h and because of the type of tile it is because it is modified to be 4 x 3 it wont be placed and it wont craft items if its 4x4.
 

Eldrazi

Eater of Worlds
The problem im having is with the custom 4x4. I need a 4w x 3h and because of the type of tile it is because it is modified to be 4 x 3 it wont be placed and it wont craft items if its 4x4.
Hang on, whut? The tile won't place? You want it to be 4x3? Then you'll just need to change/remove some values there.
Could you show me your modified code to fit the 4x3?
 
Top Bottom