Standalone [1.3] tModLoader - A Modding API

In the future it'd help if you could post the whole error. I can see the fault right away in this case, though:

This has to do with namespaces. Every class falls under a certain namespace (as you can see, this items' namespace is
DarkSaddle.Items). 'ItemID', 'TileID', 'BuffID', etc. all fall under the 'Terraria.ID' namespace. If you want to use a class from other namespaces, you'll have to include that namespace in your code:
Code:
using Terraria.ID;
These so called 'using statements' are placed at the top of your file (along with the other using statements) ;)
Thanks, i dont put the error here because its written on portuguese >_>.

EDIT: now its giving me this error error CS0117: 'Terraria.ID.TileID' não contém uma definição para 'Workbenches'
 
How do i access the Terraria steam folder?
 
It means there is a bug on Mac/Linux when decoding MP3 files. Anyway, Tremor mod has a new version that works since the mp3 files were removed.

I'm still recieving an error on the new version of Tremor.
The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at Terraria.ModLoader.ModLoader.LoadMod (Terraria.ModLoader.IO.TmodFile modFile, Terraria.ModLoader.BuildProperties properties) [0x00000] in <filename unknown>:0
at Terraria.ModLoader.ModLoader.LoadMods () [0x00000] in <filename unknown>:0
 
Can someone tell me how to make that boss drops something ???? Pls i'm blind.

Nad english :(
[DOUBLEPOST=1453760351,1453760332][/DOUBLEPOST]Bad*
 
Can someone tell me how to make that boss drops something ???? Pls i'm blind.

Nad english :(
[DOUBLEPOST=1453760351,1453760332][/DOUBLEPOST]Bad*
public override void NPCLoot()
{
int amountToDrop = Main.rand.Next(3,10);
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, ItemID.PalmWood, amountToDrop);
if(Main.rand.Next(60) == 0)
{
Item.NewItem((int)npc.position.X, (int)npc.position.Y, npc.width, npc.height, mod.ItemType("LivingTwig"));
}
}

Here is what I used.
 
Hello, a´random reply. It works with accessories but only during one frame after equipping. It should work with tiles as well.
Lol I've given up on that long ago. I actually just started modding again sort of (I have a mod ready for adding items and stuff but I just haven't gotten myself to do it).
 
One last thing (maybe) How i can make the boss that fly and Charges at you?

In Poland is 23:45 xd
[DOUBLEPOST=1453761958,1453761708][/DOUBLEPOST]One last thing maybe how can i make boss that fly and charge at you?

In Poland is 23:47
 
How do I get my npc to spawn near the beaches?
 
Anybody know how I would make my weapon spawn a projectile like the starfury or meteor staff and make the projectile I made for it spawn another projectile on enemy collision and death?
 
Can anybody tell me this! XD
 
Can anybody tell me this! XD
You could try setting your npc ai to the ai of the eye of cthulhu but Im not sure that will help :/
 
How do i access the Terraria steam folder?
C:\Program Files (x86)\Steam\steamapps\common\terraria
How do I get my npc to spawn near the beaches?
See how octopus does it. Basically check above rocklayer, and make sure x position is in outer 250 tiles.
https://github.com/bluemagic123/tModLoader/blob/master/ExampleMod/NPCs/Octopus.cs#L112
Anybody know how I would make my weapon spawn a projectile like the starfury or meteor staff and make the projectile I made for it spawn another projectile on enemy collision and death?
You just change the position and speed in shoot to spawn above the player and point at Main.MouseWorld. Then you can use PreKill or OnTileCollide to call Projectile.NewProjectile to spawn other projectiles.
 
I try to make like cthulhu hand i have a black hand witch purple eye and i try to make it like moon lord hand :D
[DOUBLEPOST=1453764672,1453764638][/DOUBLEPOST]Sry for English
 
Code:
public override bool PreShoot(Player player, Vector2 position, Vector2 velocity, int projType, int damage, float knockback)
        {
            /*Grox's Code*/
            usePos = Main.mouseWorld - player.position;
            UseStyle(player);
            position.X = Main.mouseWorld.X; //Makes the position equal to your mouse
            position.X += MathHelper.Lerp(-120f, 120f, (float)Main.rand.NextDouble()); //Allows you have the projectile spawn at random in the x direction
            position.Y -= 500; //Make the projectile spawn 500 pixels above you (About 32 tiles)
            velocity.Y = (float)(item.shootSpeed); //Makes it fall down
            velocity.X = 0; //Makes it not stray from direct path to ground
            /*End of Grox's Code*/
C:\Program Files (x86)\Steam\steamapps\common\terraria

See how octopus does it. Basically check above rocklayer, and make sure x position is in outer 250 tiles.
https://github.com/bluemagic123/tModLoader/blob/master/ExampleMod/NPCs/Octopus.cs#L112

You just change the position and speed in shoot to spawn above the player and point at Main.MouseWorld. Then you can use PreKill or OnTileCollide to call Projectile.NewProjectile to spawn other projectiles.
So something like this?
 
What do I use to check if an npc is in water?
 
Is it possible yet to add custom invasions? Or something that occurs at night like how a bloodmoon works?
 
Is it possible yet to add custom invasions? Or something that occurs at night like how a bloodmoon works?
At the moment, things like the Goblin invasion and the Frost moon aren't possible, while things like blood moons and solar eclipses are possible.
 
At the moment, things like the Goblin invasion and the Frost moon aren't possible, while things like blood moons and solar eclipses are possible.
How would I do something, like a blood moon?
 
Back
Top Bottom