tModLoader Official tModLoader Help Thread

downedBoss1 = false;
downedBoss2 = false;
downedBoss3 = false;
which of these is the eye of cthulhu, eater of worlds, and brain of cthulhu?
 
So I'm a pretty new modder, and this is my code. I'm trying to make a clone of the Enchanted Boomerang to test out projectiles, but I keep receiving the message "error CS0246 The type or namespace name 'ModProjectile' could not be found. I'm confused by this since this is the exact same as in the example code on the "Basic Projectile"

using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace TestMod.Projectiles
{
public class NanorangProjectile : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("English Display Name Here");
}

public override void SetDefaults()
{
projectile.CloneDefaults(ProjectileID.EnchantedBoomerang);
// projectile.aiStyle = 3; This line is not needed since CloneDefaults sets it.
aiType = ProjectileID.EnchantedBoomerang;
}

// Additional hooks/methods here.
}
}
 
I've got a problem with one of the files in my mod. I've tried to add the special arrows fired from the Shadowflame Bow as an actual, craftable item, which wasn't hard as the projectile already exists in-game.

However, when I tried to make an "Endless Quiver"-style item for these new arrows, an error occured, specifically error CS0117. The code that causes the error is as follows

ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModItem.ShadowflameArrow, 4000);
recipe.AddTile(TileID.CrystalBall);
recipe.SetResult(this);
recipe.AddRecipe();

Specifically, the AddIngredient line is the one causing the error. Any advice on how to fix this?
 

Attachments

  • ShadowflameArrow.cs
    1.1 KB · Views: 106
  • ShadowflameQuiver.cs
    827 bytes · Views: 115
I've got a problem with one of the files in my mod. I've tried to add the special arrows fired from the Shadowflame Bow as an actual, craftable item, which wasn't hard as the projectile already exists in-game.

However, when I tried to make an "Endless Quiver"-style item for these new arrows, an error occured, specifically error CS0117. The code that causes the error is as follows

ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModItem.ShadowflameArrow, 4000);
recipe.AddTile(TileID.CrystalBall);
recipe.SetResult(this);
recipe.AddRecipe();

Specifically, the AddIngredient line is the one causing the error. Any advice on how to fix this?
replace ModItem.ShadowflameArrow with mod.ItemType("ShadowflameArrow");
 
For some reason I am getting this error when I launch a freshly installed "tML 64 0.11.4 Windows.7z" installed on a fresh download of whatever the latest non-beta steam version is, whether through steam or through explorer directory (and I deleted "../my documents/terraria" prior)
 
So ever since tmodloader got updated I am unable to launch it, the error message "Please ensure steam is logged in and running" appears. I've resetted, uninstalled steam, and messed around with a ton things, yet I cant find whats wrong any help?
 
ModCompile folder is missing. Please help. I downloaded ModCompile XNA already, unzip it into Terraria. But the error keep appearing :(
 
You don't need to download anything manually
Disable Terraria Overhaul mod (if you had it enabled), delete the files you extracted, then go ingame and click Mod Sources
 
replace ModItem.ShadowflameArrow with mod.ItemType("ShadowflameArrow");

Unfortunately, that didn't work, but thanks anyway.
I was able to fix the error after searching these forums some more. After I replaced
"recipe.AddIngredient(ModItem.ShadowflameArrow, 4000);"
with
"recipe.AddIngredient(null,"ShadowflameArrow", 4000);"
ModLoader could compile the file without any errors.
 
i have been using tmodloader for a while now playing both singleplayer and multiplayer with friends, today when i went to install a new mod i was prompted so update tmodloader and since i didnt want to bother doing it manually i clicked the button for auto update, it did its thing downloading the auto updater but when the game re-opened i had this strange debug menu layered over my normal controls and i can't get it to go away, i've tried all the f-number keys and all the hotkeys i can think of but nothing works, any advice on getting it to disable?
 

Attachments

  • screencap.PNG
    screencap.PNG
    853.6 KB · Views: 198
So I'm a pretty new modder, and this is my code. I'm trying to make a clone of the Enchanted Boomerang to test out projectiles, but I keep receiving the message "error CS0246 The type or namespace name 'ModProjectile' could not be found. I'm confused by this since this is the exact same as in the example code on the "Basic Projectile"

using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace TestMod.Projectiles
{
public class NanorangProjectile : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("English Display Name Here");
}

public override void SetDefaults()
{
projectile.CloneDefaults(ProjectileID.EnchantedBoomerang);
// projectile.aiStyle = 3; This line is not needed since CloneDefaults sets it.
aiType = ProjectileID.EnchantedBoomerang;
}

// Additional hooks/methods here.
}
}
 
is the mod browser not working for anyone else? me and three of my friends wanted to play together but tmodloader wasnt working properly, the mod browser is offline and we cant join each others worlds
 
is the mod browser not working for anyone else? me and three of my friends wanted to play together but tmodloader wasnt working properly, the mod browser is offline and we cant join each others worlds
Yes, the Mod Browser is down and will likely remain so for a couple of days. As per the tModLoader discord:

1571315710044.png
 
Back
Top Bottom