• Journey's End on PC - Find info here and here. Please report bugs and issues for PC 1.4 and 1.4.1 to Re-Logic here.
  • Journey's End on Mobile - Find info here. Report bugs for Mobile 1.4 to DR Studios at this link and give as much detail as possible.
  • 1.4 will bring many changes to the PC version. We strongly advise making plans to back up your worlds and players prior to updating your game. More details here.
  • Console and Switch - The latest news can be found here. To report a bug, please use this link.

tModLoader Tutorial: [1] Getting started with tModLoader

BlockingCombos

Official Terrarian
Keep On Getting This Error Message:
d:\My Documents\My Games\Terraria\ModLoader\Mod Sources\TheGermaniumMod\TheGermaniumMod.cs(14,26) : error CS1513: } expected


Code:
using Terraria.ModLoader;
using Terraria.ID;

namespace TheGermaniumMod
{
    class TheGermaniumMod : Mod
    {
        public TheGermaniumMod()
        {
            Properties = new ModProperties()
            {
                Autoload = true,
                AutoloadGores = true,
                AutoloadSounds = true


                public override void AddRecipes()
        {
            {
                ModRecipe recipe = new ModRecipe(this);
                recipe.AddIngredient(ItemID.LivingFireBlock, 20);
                recipe.AddIngredient(ItemID.Fireblossom, 5);
                recipe.AddIngredient(this.GetItem(FieryTotem, 4));
                recipe.AddTile(TileID.Hellforge);
                recipe.SetResult(ItemID.FieryLava - Blade);
                recipe.AddRecipe();
            }

      
  
            }
        }
    };
 
help for christs sake help the link to download the mod skeleton!
I can't tell what im missing but i only have build.txt and a mod file so i know im missing something.
[doublepost=1494112487,1494112417][/doublepost]wait never mind i'm an idiot
 
Alright. I LITERALLY copied the build text (I mean I replaced the author and mod name) and it says

displayname is blank!
author is blank!
please update the build.txt

Please help
 

Sin Costan

Eye of Cthulhu
Alright. I LITERALLY copied the build text (I mean I replaced the author and mod name) and it says

displayname is blank!
author is blank!
please update the build.txt

Please help
Open it up on notepad because notepad++ and other text editors will read it differently. After that, just use the enter key after the end of each keyword, those being author, displayname, and version
 

PhoeniX Darkcraft8 SPQR

Skeletron Prime
Error messages are good, but what's better is an error message and the code!
[doublepost=1497733934,1497733853][/doublepost]
Also the error could be that you don't have a matching "{" for a "}"
ok there is the code
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Mod Sources.Darkcraftmod.Items
{
public class Sword : ModItem
{
public override void SetDefaults()
{
item.name = "Darkcraft sword";
item.damage = 50;
item.melee = true;
item.width = 60;
item.height = 60;
item.toolTip = "This is Darkcraft sword.";
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 6;
item.value = Item.buyPrice(0, 10, 0, 0);
item.rare = 2;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
 

Sin Costan

Eye of Cthulhu
ok there is the code
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Mod Sources.Darkcraftmod.Items
{
public class Sword : ModItem
{
public override void SetDefaults()
{
item.name = "Darkcraft sword";
item.damage = 50;
item.melee = true;
item.width = 60;
item.height = 60;
item.toolTip = "This is Darkcraft sword.";
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 6;
item.value = Item.buyPrice(0, 10, 0, 0);
item.rare = 2;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
Namespace is incorrect, can you show me your folder structure? I'm guessing that your mod name is "Darkcraftmod", if that is the folder name, then it should just be

Code:
Darkcraftmod.Items
Since the "Mod Sources" is the place it compiles things at anyways.
 

PhoeniX Darkcraft8 SPQR

Skeletron Prime
Namespace is incorrect, can you show me your folder structure? I'm guessing that your mod name is "Darkcraftmod", if that is the folder name, then it should just be

Code:
Darkcraftmod.Items
Since the "Mod Sources" is the place it compiles things at anyways.
thank ta fixed my first item :D
[doublepost=1497806099,1497805689][/doublepost]another bug:
c:\Users\Marie\Documents\My Games\Terraria\ModLoader\Mod Sources\DarkcraftMeleemod\Items\Darkcraftsword.cs(11,18) : error CS1061: 'Terraria.Item' ne contient pas une définition pour 'name' et aucune méthode d'extension 'name' acceptant un premier argument de type 'Terraria.Item' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?)

c:\Users\Marie\Documents\My Games\Terraria\ModLoader\Mod Sources\DarkcraftMeleemod\Items\Darkcraftsword.cs(16,18) : error CS1061: 'Terraria.Item' ne contient pas une définition pour 'toolTip' et aucune méthode d'extension 'toolTip' acceptant un premier argument de type 'Terraria.Item' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?)
the new code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Darkcraftmod.Items
{
public class Darkcraftmod : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Darkcraft sword");
Tooltip.SetDefault("This is Darkcraft sword.");
}
public override void SetDefaults()
{
item.damage = 50;
item.melee = true;
item.width = 40;
item.height = 40;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 6;
item.value = 10000;
item.rare = 2;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
 
Last edited:

Sin Costan

Eye of Cthulhu
thank ta fixed my first item :D
[doublepost=1497806099,1497805689][/doublepost]another bug:
c:\Users\Marie\Documents\My Games\Terraria\ModLoader\Mod Sources\DarkcraftMeleemod\Items\Darkcraftsword.cs(11,18) : error CS1061: 'Terraria.Item' ne contient pas une définition pour 'name' et aucune méthode d'extension 'name' acceptant un premier argument de type 'Terraria.Item' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?)

c:\Users\Marie\Documents\My Games\Terraria\ModLoader\Mod Sources\DarkcraftMeleemod\Items\Darkcraftsword.cs(16,18) : error CS1061: 'Terraria.Item' ne contient pas une définition pour 'toolTip' et aucune méthode d'extension 'toolTip' acceptant un premier argument de type 'Terraria.Item' n'a été trouvée (une directive using ou une référence d'assembly est-elle manquante ?)
the new code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Darkcraftmod.Items
{
public class Darkcraftmod : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Darkcraft sword");
Tooltip.SetDefault("This is Darkcraft sword.");
}
public override void SetDefaults()
{
item.damage = 50;
item.melee = true;
item.width = 40;
item.height = 40;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = 1;
item.knockBack = 6;
item.value = 10000;
item.rare = 2;
item.UseSound = SoundID.Item1;
item.autoReuse = true;
}

public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}
I am guessing this is for the new tModLodaer .10, so here is the migration guide to help you. https://docs.google.com/document/d/1GY6Jyj0IkqfvQlXJUwXg60d2V8tIzumoNVgh5OWzGIc/edit

He hasn't updated this yet for the new tModLoader.
 

PhoeniX Darkcraft8 SPQR

Skeletron Prime
now
Missing mod: DarkcraftMeleemodItems/ExampleSword
à Terraria.ModLoader.ModLoader.GetTexture(String name)
à Terraria.ModLoader.ModItem.AutoStaticDefaults()
à Terraria.ModLoader.Mod.SetupContent()
à Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
little help how did y add these in the code ?
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace DarkcraftMeleemodItems
{
public class ExampleSword : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("This is a Darkcraft8 sword."); //The (English) text shown below your weapon's name
}

public override void SetDefaults()
{
item.damage = 50; //The damage of your weapon
item.melee = true; //Is your weapon a melee weapon?
item.width = 40; //Weapon's texture's width
item.height = 40; //Weapon's texture's height
item.useTime = 20; //The time span of using the weapon. Remember in terraria, 60 frames is a second.
item.useAnimation = 20; //The time span of the using animation of the weapon, suggest set it the same as useTime.
item.useStyle = 1; //The use style of weapon, 1 for swinging, 2 for drinking, 3 act like shortsword, 4 for use like life crystal, 5 for use staffs or guns
item.knockBack = 6; //The force of knockback of the weapon. Maxium is 20
item.value = 10000; //The value of the weapon
item.rare = 2; //The rarity of the weapon, from -1 to 13
item.UseSound = SoundID.Item1; //The sound when the weapon is using
item.autoReuse = true; //Whether the weapon can use automaticly by pressing mousebutton
}

public override void SetStaticDefaults()
{
DisplayName.SetDefault("");
Tooltip.SetDefault("");
}


public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(null, "ExampleItem", 10);
recipe.AddTile(null, "ExampleWorkbench");
recipe.SetResult(this);
recipe.AddRecipe();
}

public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.Next(3) == 0)
{
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, mod.DustType("Sparkle"));
//Emit dusts when swing the sword
}
}

public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
target.AddBuff(BuffID.OnFire, 60); //Add Onfire buff to the NPC for 1 second
}
}
}
 

Cryptologic

Terrarian
Hi, i am not able to build my mod. Here are Screenshots. I used the "MyFirstMod" File.

my Build.txt:

author = Shasa2308
version = 0.1
displayName = ShasaMOD
homepage = http://forums.terraria.org/index.php?posts/998374
hideCode = false
hideResources = false
includeSource = true
buildIgnore = *.csproj, *.user, obj\*, bin\*, .vs\*
includePDB = true

I hope you can help me. Thanks :) (any German here how can help me? --> conversation)
upload_2017-6-27_23-48-21.png


upload_2017-6-27_23-53-54.png
 

Sin Costan

Eye of Cthulhu
Hi, i am not able to build my mod. Here are Screenshots. I used the "MyFirstMod" File.

my Build.txt:

author = Shasa2308
version = 0.1
displayName = ShasaMOD
homepage = http://forums.terraria.org/index.php?posts/998374
hideCode = false
hideResources = false
includeSource = true
buildIgnore = *.csproj, *.user, obj\*, bin\*, .vs\*
includePDB = true

I hope you can help me. Thanks :) (any German here how can help me? --> conversation)
View attachment 174579

View attachment 174580
Like I have said for the above.

I am guessing this is for the new tModLodaer .10, so here is the migration guide to help you. https://docs.google.com/document/d/1GY6Jyj0IkqfvQlXJUwXg60d2V8tIzumoNVgh5OWzGIc/edit

He hasn't updated this yet for the new tModLoader.
 

CrappyCrisp

Terrarian
I get this error whenever I try to build and I have tried removing modcompile = true if I do it it just brings back another error I posted on the forums but waiting on a response

Missing dll files for Crispy Mod 4.47.44 PM

Must have either All.dll or both of Windows.dll and Mono.dll
All.dll must not have any references to Microsoft.Xna.Framework or FNA
Windows.dll must reference the windows Terraria.exe and Microsoft.Xna.Framework.dll
Mono.dll must reference a non-windows Terraria.exe and FNA.dll
 
Top Bottom