tModLoader Official tModLoader Help Thread

Noob_z2000

Terrarian
Please help, there's no updated worm boss tutorial and all the example mod does is take an already existing sprite(s). I need help. Please reply if you can.
 

hyperdyne

Terrarian
greetings from linux debian ubuntu 20.04!
the mods work naticelt with steam launcher and tmod after running terraria once..

but the mods cant be found throught the browser or autodownloaded using the modpacks json file

it lists all the mods old and new on the mod browser
info button works

but when you click the download button it literally does nothing.

can someone fix this please?
 

BeardedLady

Terrarian
Hello all. So I recently had my computer wiped and cleaned. Since then, I have been unable to access my main worlds, have access to my main characters and have my mods active at the same time. I have done nothing different from before the computer wipe. All my mods are the same. I am so confused, any help would be greatly appreciated. I think this is the file you need.
 

Attachments

  • 2020-09-17-1.zip
    3.7 KB · Views: 75

fakeliar35

Official Terrarian
Try to downgrade 1 version in GOG and see if it works. TML is not always compatible with all of them

Hi there,

I have the same issue as the other guy which is how i found this thread cus i was looking for solutions online. However, I dont know how to downgrade 1 version in GOG as i have never had any issue with TModLoader before and certainly not as far as the GOG or whatever its called is concerned so i never really bothered with how all that worked. So any help on that front would be greatly appreciated
 

Jofairden

Duke Fishron
tModLoader
Hi there,

I have the same issue as the other guy which is how i found this thread cus i was looking for solutions online. However, I dont know how to downgrade 1 version in GOG as i have never had any issue with TModLoader before and certainly not as far as the GOG or whatever its called is concerned so i never really bothered with how all that worked. So any help on that front would be greatly appreciated
Maybe this helps:
-Click on the game in the side bar, should take you to a page that says "Play" in green and next to that is a "More" drop down menu

-In the "More" menu, go to "Settings"

-in "Settings" there should be a list of "Override Features" including Auto-Updates

-Uncheck the "Automatically update to newest version" box, that should make a list pop up of which version you want to revert to.
Source: Downgrade to older versions?, page 1 - Forum - GOG.com
 

hyc

Terrarian
Is there a way to make a effect to let enemies detect you from more far out ? like the beetle armor ? I'm Trying to make something like "All Orignal Armor V2" :confused:
 

verdenvidia

Terrarian
I have successfully added modded items to chests, but now I want to block vanilla items at the same time so as to not get two items from one chest (like how you can't get a Balloon and a Starfury in the same sky chest) and Example Mod doesn't appear to go into that. I tried tinkering around but couldn't quite get it right. Any help would be greatly appreciated, thank you
 

rtpkd1

Terrarian
Soo, even if I do something that I can name "a mod", I won't be able to run it in the current Terraria version?
 

Dragon244

Terrarian
This is probably a dumb question, but how can I make an item that summons vanilla events like the slime rain or maybe even the pillars.
 

willcocobo

The Destroyer
cursedball.png
so i am trying to make my first animated projectile, im having a lot of trouble with it. only 4 frames and it has 2 pixles between each frame ( 1 terraria sized pixle ). for this im making it come out of a spear. i dont know how to make it work so help would be very kind.

code for the projectile:


namespace Modding2.Projectiles
{
class cursedball : ModProjectile
{
public override void SetStaticDefaults()
{
Main.projFrames[projectile.type] = 4;
if (++projectile.frameCounter >= 5)
{
projectile.frameCounter = 0;
if (++projectile.frame >= 4)
{
projectile.frame = 0;
}
}
}
public override void SetDefaults()
{
projectile.Name = "cursedball";
projectile.width = 28;
projectile.height = 28;
projectile.friendly = true;
projectile.tileCollide = true;
projectile.magic = true;
projectile.timeLeft = 600;
projectile.light = 1f;
projectile.aiStyle = 0;
projectile.ignoreWater = true;
Main.projFrames[projectile.type] = 4;
}
public override void AI()
{
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
}
}
}


code for the thing thats firing it:

public class cursedspear : ModItem
{

public override void SetStaticDefaults()
{
// DisplayName.SetDefault("ExampleSword");
}
public override void SetDefaults()
{
item.damage = 32;
item.melee = true;
item.width = 40;
item.height = 40;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 3;
item.value = 10000;
item.rare = 3;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.shoot = mod.ProjectileType("cursedball");
item.shootSpeed = 8f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Wood, 10);
recipe.AddIngredient(mod.ItemType("Steel"), 8);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
 

Solo-Ion

Dungeon Spirit
View attachment 295632 so i am trying to make my first animated projectile, im having a lot of trouble with it. only 4 frames and it has 2 pixles between each frame ( 1 terraria sized pixle ). for this im making it come out of a spear. i dont know how to make it work so help would be very kind.

code for the projectile:


namespace Modding2.Projectiles
{
class cursedball : ModProjectile
{
public override void SetStaticDefaults()
{
Main.projFrames[projectile.type] = 4;
if (++projectile.frameCounter >= 5)
{
projectile.frameCounter = 0;
if (++projectile.frame >= 4)
{
projectile.frame = 0;
}
}
}
public override void SetDefaults()
{
projectile.Name = "cursedball";
projectile.width = 28;
projectile.height = 28;
projectile.friendly = true;
projectile.tileCollide = true;
projectile.magic = true;
projectile.timeLeft = 600;
projectile.light = 1f;
projectile.aiStyle = 0;
projectile.ignoreWater = true;
Main.projFrames[projectile.type] = 4;
}
public override void AI()
{
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
}
}
}


code for the thing thats firing it:

public class cursedspear : ModItem
{

public override void SetStaticDefaults()
{
// DisplayName.SetDefault("ExampleSword");
}
public override void SetDefaults()
{
item.damage = 32;
item.melee = true;
item.width = 40;
item.height = 40;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 3;
item.value = 10000;
item.rare = 3;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
item.shoot = mod.ProjectileType("cursedball");
item.shootSpeed = 8f;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Wood, 10);
recipe.AddIngredient(mod.ItemType("Steel"), 8);
recipe.AddTile(TileID.Anvils);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
The only thing that you want in 'SetStaticDefaults()' is 'Main.projFrames[projectile.type] = 4;' The rest should go in AI.
 

willcocobo

The Destroyer
so i tried what you said, maybe i just did it wrong but it didnt work. Did i do the sprite sheet right?


what the code is now:

class cursedball : ModProjectile
{
public override void SetStaticDefaults()
{
Main.projFrames[projectile.type] = 4;
}
public override void SetDefaults()
{
projectile.Name = "cursedball";
projectile.width = 28;
projectile.height = 28;
projectile.friendly = true;
projectile.tileCollide = true;
projectile.magic = true;
projectile.timeLeft = 600;
projectile.aiStyle = 0;
projectile.ignoreWater = true;

}
public override void AI()
{
// projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
projectile.frameCounter = 0;
if (++projectile.frameCounter >= 5)
{
projectile.frameCounter = 0;
if (++projectile.frame >= 4)
{
projectile.frame = 0;
 

Solo-Ion

Dungeon Spirit
so i tried what you said, maybe i just did it wrong but it didnt work. Did i do the sprite sheet right?


what the code is now:

class cursedball : ModProjectile
{
public override void SetStaticDefaults()
{
Main.projFrames[projectile.type] = 4;
}
public override void SetDefaults()
{
projectile.Name = "cursedball";
projectile.width = 28;
projectile.height = 28;
projectile.friendly = true;
projectile.tileCollide = true;
projectile.magic = true;
projectile.timeLeft = 600;
projectile.aiStyle = 0;
projectile.ignoreWater = true;

}
public override void AI()
{
// projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 1.57f;
projectile.frameCounter = 0;
if (++projectile.frameCounter >= 5)
{
projectile.frameCounter = 0;
if (++projectile.frame >= 4)
{
projectile.frame = 0;
Hang on, I've read the animation code more carefully and spotted some more errors. Don't have ++ inside if brackets. You use them to increase a value by one. In this case you want to increase frame counter every frame, and increase the frame and reset the frame counter once the frame counter reaches a certain number. You are currently resetting both the frame and the frame counter every frame without increasing either of them.
You want something that looks more like this.
Code:
projectile.frameCounter++; //increase the frame counter
if (projectile.frameCounter >= 5) //once frameCounter reaches the target
{
    projectile.frameCounter = 0; //reset the counter
    projectile.frame++; //and increase the frame
}
if (projectile.frame >= 4) //once past the end of the amination
{
    projectile.frame = 0; //reset the animation
}

I haven't tested this, but it should work. I also can't tell if your closing brackets match up with your opening ones, so there may be mistakes there.
 

kyllinglove

Official Terrarian
I'm new to modding and can't understand what is wrong with this. Both projectiles fire, but the "HarpyBowProjectile" doesn't hit enemies, dummies etc
The code:

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Fmod.Items.Weapons.Ranged.Bows
{
class HarpyBow : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("Shoots arrows and feathers");
}
public override void SetDefaults()
{
item.damage = 200;
item.noMelee = true;
item.ranged = true;
item.width = 11;
item.height = 32;
item.useStyle = ItemUseStyleID.HoldingOut;
item.useAmmo = AmmoID.Arrow;
item.useTime = 50;
item.useAnimation= 50;
item.shootSpeed = 2f;
item.autoReuse = true;
item.shoot = AmmoID.Arrow;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("HarpyBowProjectile"), 300, 2f, player.whoAmI);
return true;
}
}
}




This might be the wrong place to ask questions, but I don't know, so I'm posting here
 

willcocobo

The Destroyer
Hang on, I've read the animation code more carefully and spotted some more errors. Don't have ++ inside if brackets. You use them to increase a value by one. In this case you want to increase frame counter every frame, and increase the frame and reset the frame counter once the frame counter reaches a certain number. You are currently resetting both the frame and the frame counter every frame without increasing either of them.
You want something that looks more like this.
Code:
projectile.frameCounter++; //increase the frame counter
if (projectile.frameCounter >= 5) //once frameCounter reaches the target
{
    projectile.frameCounter = 0; //reset the counter
    projectile.frame++; //and increase the frame
}
if (projectile.frame >= 4) //once past the end of the amination
{
    projectile.frame = 0; //reset the animation
}

I haven't tested this, but it should work. I also can't tell if your closing brackets match up with your opening ones, so there may be mistakes there.
sorry for late reply, man you are amazing it did work. kinda feels like a dumb mistake. thank you so, so much!
 

willcocobo

The Destroyer
I'm new to modding and can't understand what is wrong with this. Both projectiles fire, but the "HarpyBowProjectile" doesn't hit enemies, dummies etc
The code:

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Fmod.Items.Weapons.Ranged.Bows
{
class HarpyBow : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("Shoots arrows and feathers");
}
public override void SetDefaults()
{
item.damage = 200;
item.noMelee = true;
item.ranged = true;
item.width = 11;
item.height = 32;
item.useStyle = ItemUseStyleID.HoldingOut;
item.useAmmo = AmmoID.Arrow;
item.useTime = 50;
item.useAnimation= 50;
item.shootSpeed = 2f;
item.autoReuse = true;
item.shoot = AmmoID.Arrow;
}
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, mod.ProjectileType("HarpyBowProjectile"), 300, 2f, player.whoAmI);
return true;
}
}
}




This might be the wrong place to ask questions, but I don't know, so I'm posting here

you should post the code of the projectile its self, it could be a problem there
 
Top Bottom