Standalone [1.3] tModLoader - A Modding API

And what is the namespace of your AncientMuramasa item?
I changed all the namespaces to Miscellania.
EDIT: Here's the item code if it's somehow related:
Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Miscellania.Items
{
    public class AncientMuramasa : ModItem
    {
        public override void SetDefaults()
        {
            item.CloneDefaults(ItemID.Muramasa);
            item.name = "Ancient Muramasa";
        }
       
        public override void MeleeEffects(Player player, Rectangle hitbox)
        {
            int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), (int)(hitbox.Width * 1.25F), (int)(hitbox.Height * 1.25F), 29);
            Main.dust[dust].noGravity = true;
        }
    }
}
 
em, i just want to suggest this, currently it isn't a feature, but it think it'd go good for the mod loader if its a feature, there should be a bow that has a spread on it, weather its even or random, up to you. But its a working, spread bow that you can edit, so it saves the confusion and time of 'trying to put/putting' in the code.
 
em, i just want to suggest this, currently it isn't a feature, but it think it'd go good for the mod loader if its a feature, there should be a bow that has a spread on it, weather its even or random, up to you. But its a working, spread bow that you can edit, so it saves the confusion and time of 'trying to put/putting' in the code.
There are examples on even/random spreads on the tModLoader help thread, shouldn't be too hard to follow :)
 
I'm getting this error when I try to rebuild my mod:

c:\Users\Heath\Documents\My Games\Terraria\ModLoader\Mod Sources\XaminafMod\XaminafMod.cs(11,24) : error CS0115: 'XaminafMod.XaminafMod.SetModInfo(out string, ref Terraria.ModLoader.ModProperties)': no suitable method found to override
 
I'm getting this error when I try to rebuild my mod:

c:\Users\Heath\Documents\My Games\Terraria\ModLoader\Mod Sources\XaminafMod\XaminafMod.cs(11,24) : error CS0115: 'XaminafMod.XaminafMod.SetModInfo(out string, ref Terraria.ModLoader.ModProperties)': no suitable method found to override
That's because that method is obsolete.
Remove that method and use the following code instead:
Code:
public XaminafMod()
{
    Properties = new ModProperties()
    {                
        Autoload = true,
        AutoloadGores = true,
        AutoloadSounds = true
    };
}
 
That's because that method is obsolete.
Remove that method and use the following code instead:
Code:
public XaminafMod()
{
    Properties = new ModProperties()
    {               
        Autoload = true,
        AutoloadGores = true,
        AutoloadSounds = true
    };
}
c:\Users\Heath\Documents\My Games\Terraria\ModLoader\Mod Sources\XaminafMod\XaminafMod.cs(9,8) : error CS1518: Expected class, delegate, enum, interface, or struct
 
A syntax error.
Could you show me your code?
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace XaminafMod
{
public XaminafMod()
{
Properties = new ModProperties()
{
Autoload = true,
AutoloadGores = true,
AutoloadSounds = true
};
}
}
 
c:\Users\Heath\Documents\My Games\Terraria\ModLoader\Mod Sources\XaminafMod\XaminafMod.cs(9,8) : error CS1518: Expected class, delegate, enum, interface, or struct
You still need the namespace and class declaration.
Code:
using Terraria.ModLoader;

namespace XaminafMod
{
    class XaminafMod : Mod
    {
        public XaminafMod()
        {
            Properties = new ModProperties()
            {
                Autoload = true,
                AutoloadGores = true,
                AutoloadSounds = true
            };
        }
    }
}
 
Hey so im having an issue. I have tModloader v0.8 and everything is up to date, but i cant access my map. It wasnt happening before and now all of a sudden it is. It doesnt show up in gameplay in the top right and i cant go fullscreen. Have you seen this before and is there some way to fix it?
 
It seems like tModLoader doesn't work if you change your mod's Name property (or maybe I'm doing something wrong?:confused:).
My mod's folder is called Miscellania, but I want the internal name to be GoldensMisc. So I did this in my mod class:
Code:
        public override string Name
        {
            get
            {
                return "GoldensMisc"; //For backwards compatibility.
            }
        }
And now I get this error:
Code:
Missing mod: Miscellania/Items/AncientMuramasa
   in Terraria.ModLoader.ModLoader.GetTexture(String name)
   in Terraria.ModLoader.Mod.SetupContent()
   in Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
I don't get the error when I remove that code. Also I tried naming my main mod file both GoldensMisc.cs and Miscellania.cs and nothing's changed.
Hm, does changing the folder name work?

em, i just want to suggest this, currently it isn't a feature, but it think it'd go good for the mod loader if its a feature, there should be a bow that has a spread on it, weather its even or random, up to you. But its a working, spread bow that you can edit, so it saves the confusion and time of 'trying to put/putting' in the code.
Confusion and time to code? The entire point of a modding API is to make your code work in the game o_O

Hey so im having an issue. I have tModloader v0.8 and everything is up to date, but i cant access my map. It wasnt happening before and now all of a sudden it is. It doesnt show up in gameplay in the top right and i cant go fullscreen. Have you seen this before and is there some way to fix it?
Does pressing Tab or M work? If not, what mods are you using?
 
So I tried publishing my mod for the first time and got this
Mod signed
File is valid....
Query3 failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Mod','Fargowiltas','v0.0.1','Fargowilta','This mod adds an npc that will \r\ns' at line 1
and of course I'm not sure what this means :p
 
So I tried publishing my mod for the first time and got this
Mod signed
File is valid....
Query3 failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 's Mod','Fargowiltas','v0.0.1','Fargowilta','This mod adds an npc that will \r\ns' at line 1
and of course I'm not sure what this means :p
I just changed some code on the server to maybe fix this. If it doesn't work, let me know.
 
Hm, does changing the folder name work?
Actually I figured it out.
The namespace should be same as the mod's internal name (and it looks like the folder name doesn't matter). So right now the folder is called Miscellania and the namespace is GoldensMisc, and everything works fine.
But thank you for responding anyway :)
 
Back
Top Bottom