Recent content by Will-Banksy

  1. W

    tModLoader Official tModLoader Help Thread

    In the code for when the bomb explodes, loop through Main.player and see if any of the players are within some radius of the centre of the projectile, if they are then player.statLife += healAmount; // Gives Health player.HealEffect(healAmount, true); // Healing effect
  2. W

    tModLoader Official tModLoader Help Thread

    Heyo all I don't suppose anyone could help me with this error? I'm on Linux btw in case that's relevant
  3. W

    tModLoader Official tModLoader Help Thread

    I'm using git, so I can always revert if things go badly. Thanks though
  4. W

    tModLoader Official tModLoader Help Thread

    I think you need to set projectile.friendly to true
  5. W

    tModLoader Official tModLoader Help Thread

    Hello, I'm trying to make an NPC, and I don't know how I would make the actual hitbox of the NPC smaller than the sprite? I know I can change npc.width and npc.height, but I'm hesitant to in case that breaks the animation. Plus I'm wanting the hitbox offset from (0, 0) on the sprite anyway. Help...
  6. W

    tModLoader Official tModLoader Help Thread

    Set the player.thorns variable to the appropriate value (0 is 0% damage, 1 is 100% damage)
  7. W

    tModLoader Official tModLoader Help Thread

    item.name is not a thing - there is no 'name' variable in Item. Also, there is no AddTooltip method in ModItem. Delete those and do this: public override void SetStaticDefaults() { DisplayName.SetDefault("Tech Plate"); Tooltip.SetDefault("A plate equipped with tech stuff"); }
  8. W

    tModLoader Official tModLoader Help Thread

    Sure: // Override UseItem in ModItem public override bool UseItem(Player player) { player.AddBuff(Terraria.ID.BuffID.Hunter, 360); // Add the Hunter buff to the player for 6 seconds player.AddBuff(Terraria.ID.BuffID.Horrified, 360); // Add the Horrified buff the the player for 6 seconds...
  9. W

    tModLoader Official tModLoader Help Thread

    I don't think you can use the recipe finder for that - If you want to make a recipe for a vanilla item, just create a recipe like you'd usually do, and set the result to that item.
  10. W

    tModLoader Official tModLoader Help Thread

    You'll have to apply the buffs in UseItem with player.AddBuff, instead of setting item.buffType.
  11. W

    tModLoader Official tModLoader Help Thread

    You can probably locate the vanilla sprites in Main (assuming you have access to the source code) and then in your mod, I guess in your mod's Load() method? you can replace those sprites with your own, for example: Main.dukeFishronTexture = ModContent.GetTexture("ModFolder/pathToImage"); That...
  12. W

    tModLoader Official tModLoader Help Thread

    In your magic weapon item's class, you'll need to override the Shoot method like so: public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack) { // Check for that 10% chance if(Main.rand.Next(10)...
  13. W

    tModLoader Official tModLoader Help Thread

    I can certainly try to help you with any questions you have, but the best way to learn is to just jump into it. Do have at least a quick look at a C# tutorial (tutorialspoint has a good one I think) as I had no idea how to code when I started modding, and didn't have a look at any tutorials, and...
  14. W

    tModLoader Official tModLoader Help Thread

    You seem to be checking if player.miscEquips is true, but it's an Item[] array, and it can't convert that to a boolean. What exactly is the if(player.miscEquips) meant to be checking? tModLoader doesn't have a decompiler (that I'm aware of), so you're going to have to use something like ilspy...
  15. W

    tModLoader Official tModLoader Help Thread

    Probably be useful to create a Helper class with some commonly used/useful functions in, like hasInInventory and hasEquippedAccessory You can probably change that in GlobalTile, but I wouldn't know how sorry
Back
Top Bottom