Standalone [1.3] tModLoader - A Modding API

Is there a way to make a sword fire a healing projectile? If so can I have the code?
Why would you want to heal your enemies? Or are you trying to have the projectile heal the player if it hits, like vampire knives? Or are you trying to shoot heal projectiles that the player can run up to and heal themselves? All are possible (with some caveats), but I can help you if you explain.
 
Why would you want to heal your enemies? Or are you trying to have the projectile heal the player if it hits, like vampire knives? Or are you trying to shoot heal projectiles that the player can run up to and heal themselves? All are possible (with some caveats), but I can help you if you explain.
Like the vampire knives. I'll kill two birds with one stone
[DOUBLEPOST=1442108302,1442108112][/DOUBLEPOST]
They talked about it a while ago and I know you won't like the sound of this but you might have to look through the pages but I'm pretty sure it's past page 70 so you could start there.
Ohhhhhh. FUUUUUUUUUUUUUUU!!!!!!!!!!!
 
That's the easiest. Do this to your projectile.
Code:
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
    projectile.vampireHeal(damage, target.Center);
}
Also do you know how to make a projectile like the Scourge of the Corrupter's projectiles?
P.S. Thx
 
Because I moved it to vanilla folder, but if I try to move to terraria folder it says the same
In that case, could you try using a fresh install of Terraria? For some reason that seems to work for some people.

If that still doesn't work, could you right click the modded exe file, click on Properties, then tell me the exact file size in bytes?
 
@bluemagic123 /@jopojelly
A Dungeon Spirit gives off it's blue dust as part of it's AI. How would you increase dust production to, say, 100 times it's normal amount?
Here is a screenshot of 100 Dungeon Spirit Ai enemies on top of each other.

Capture.PNG


And while I'm here, can you replace dusts or recolor it to a red somehow?
 
Last edited:
good mod loader crashed my terraria twice because of OP damage like -99125812934
[DOUBLEPOST=1442169140,1442169111][/DOUBLEPOST]it not op but it was at 10000019 before lol
 
We need a list and flair for TModLoader mods.
At the moment most mods in the front page of the WIP section of the forums are tModLoader mods. There probably won't be any flair for any modding api though until they're fully released.

nvm I got it
[DOUBLEPOST=1442163874,1442163571][/DOUBLEPOST]how do I make textures when they are too small to edit?
Most image editors will have a zoom in feature.

@bluemagic123 /@jopojelly
A Dungeon Spirit gives off it's blue dust as part of it's AI. How would you increase dust production to, say, 100 times it's normal amount?
Here is a screenshot of 100 Dungeon Spirit Ai enemies on top of each other.

View attachment 77463

And while I'm here, can you replace dusts or recolor it to a red somehow?
You'll have to use a for loop in the AI method and call Dust.NewDust inside that loop. (The example mod has some examples of this.) To give it a color, there's a color parameter in both Dust.NewDust and ModDust.NewDust (whichever you're using).

how do I make something immune to lava?
The NPC class has a lavaImmune field or something like that.
 
i have been having a problem where the mod says "The name 'TileID' does not exist in the current context"
but using the same code in other items works
here is the code
using System;
using System.Collections.Generic;
using Terraria;
using Terraria.ModLoader;

namespace epimod.Items.Armor {
public class SandstormLeggings : ModItem
{
public override bool Autoload(ref string name, ref string texture, IList<EquipType> equips)
{
equips.Add(EquipType.Legs);
return true;
}

public override void SetDefaults()
{
item.name = "Sandstorm Leggings";
item.width = 18;
item.height = 18;
AddTooltip("the leggings increce your speed insanely");
AddTooltip2("15% increased movement speed and 25% increased use speed");
item.value = 10000;
item.rare = 2;
item.defense = 3;
}

public override void UpdateEquip(Player player)
{
player.moveSpeed += 0.15f;
player.meleeSpeed += 0.25f;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(null, "SandGem", 10);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}}
what should i do???
 
Back
Top Bottom