Standalone [1.3] tModLoader - A Modding API

Try different Combinations of those 5 Mods and try to find out which one is causing the Bug.
Or at least thats what i Do when a Mod for Terraria or MC is not Working.
My guess is that one of ImkSushiMods recipes has the same ID as one of Calamity Mods, but if thats the case you can use a Imks .json file to change the ID.
(I think)
I did but any mod i kept replacing 1 mod with another still nothing :/
 
Like I said before, you're pasting a file path into an empty class, which makes no sense to the compiler. What are you trying to do, and why?
I'm trying to fix that texture bug, which @jopojelly has a guide on.
What Versions of TModloader and Terraria are you using?

If youre using 1.3.4 the Old ones Army will make you crash when bundled up with TModloader + Many Mods.

I myself did the Rookie mistake of Updating my Terraria to 1.3.4 without waiting for TModloader to do the same (It is still in Version 1.3.3, and Bluemagic123 said that his Team would wait for Update 1.3.4.1 to come Out before Updating).

Also nice Avatar :)
[doublepost=1480872820,1480872614][/doublepost]

You have one too many } , i think.
Or, like Kazzymodus said, you have an Empty Class and i am just to dumb to notice.
Try this:

Make a public class file named TheDankMod.Items.Weapons, or just TheDankMod.Items .
then, fill that class with attributes like: using Terraria.ID(Just write down the ones that are in terrarias actual Item/Melee Weapon file.)
note that you also need a New ID for your TheFeministBlade. (What kind of name is that :) ) The ID into both your TheFeministBlade category, as well as into your new melee weapon file.
If you want your weapon to be dropped as well, i recommend making a dummy monster with any small texture you want.
Oh and dont forget to use TModloader in your TheDankMod.Weapon class.

Kazzymodus, correct me if i am Wrong or missing something. (Highly possible.)
I am so sorry, but I do not understand, I don't think I'm cut out for coding
 
I'm trying to fix that texture bug, which @jopojelly has a guide on.

I am so sorry, but I do not understand, I don't think I'm cut out for coding

I know it can be frustrating, but you shouldn't give up! I nearly did, but I decided to post a little help thread, and @Kazzymodus (thanks again by the way!) helped me sort out my issues.

Here, take these tips. They got me through making most of my first mod.
I usually copy-paste lines of code from the ExampleMod files and modify them to my needs. It has almost everything you need for a mod. I also found a good practice is to name everything the same thing. my sprites are in the same folder as the code is, both named the same but with different extensions. For example: if I made an item called Kitty, I would name the .cs file "Kitty.cs" and the image file "Kitty.png". In the cs file, this line would also appear: "public class Kitty : ModItem"

I also used these video tutorials to help me get started.


The music is upbeat, and I find it to explain things very well.

If you need any kind of assistance, I would be more than willing to use the nifty conversations feature to help you get started with this beautiful form of digital art. And I bet others are too.

And remember to always follow your ideals!
y'know, cuz your avatar is zekrom, the pokemon of ideals?
~Sol
 
I know it can be frustrating, but you shouldn't give up! I nearly did, but I decided to post a little help thread, and @Kazzymodus (thanks again by the way!) helped me sort out my issues.

Here, take these tips. They got me through making most of my first mod.
I usually copy-paste lines of code from the ExampleMod files and modify them to my needs. It has almost everything you need for a mod. I also found a good practice is to name everything the same thing. my sprites are in the same folder as the code is, both named the same but with different extensions. For example: if I made an item called Kitty, I would name the .cs file "Kitty.cs" and the image file "Kitty.png". In the cs file, this line would also appear: "public class Kitty : ModItem"

I also used these video tutorials to help me get started.


The music is upbeat, and I find it to explain things very well.

If you need any kind of assistance, I would be more than willing to use the nifty conversations feature to help you get started with this beautiful form of digital art. And I bet others are too.

And remember to always follow your ideals!
y'know, cuz your avatar is zekrom, the pokemon of ideals?
~Sol
has anyone ever told you that you are an amazing person? I think I'm probably the 157376519347173491374th person. You are an amazing person.
 
I know it can be frustrating, but you shouldn't give up! I nearly did, but I decided to post a little help thread, and @Kazzymodus (thanks again by the way!) helped me sort out my issues.

Here, take these tips. They got me through making most of my first mod.
I usually copy-paste lines of code from the ExampleMod files and modify them to my needs. It has almost everything you need for a mod. I also found a good practice is to name everything the same thing. my sprites are in the same folder as the code is, both named the same but with different extensions. For example: if I made an item called Kitty, I would name the .cs file "Kitty.cs" and the image file "Kitty.png". In the cs file, this line would also appear: "public class Kitty : ModItem"

I also used these video tutorials to help me get started.


The music is upbeat, and I find it to explain things very well.

If you need any kind of assistance, I would be more than willing to use the nifty conversations feature to help you get started with this beautiful form of digital art. And I bet others are too.

And remember to always follow your ideals!
y'know, cuz your avatar is zekrom, the pokemon of ideals?
~Sol
What do I do with the ExampleMod? Is there a way to decompile it? So I can look at it's code?
 
Can somebody help me, i cannot shoot projectile type ammo, they dont show up when i shoot, it happend today and i dont know how to fix it... halp plzz :D i have latest tModloader verision (it seems there is a heavy load error when i try to update mods, but i dont think that is cousing the problem)
 
Heeeeelooooo!! This is the kid who can't do jack sh:red:t with coding!! This is what I got:
c:\Users\Masud\Documents\My Games\Terraria\ModLoader\Mod Sources\The Dank Mod\The Dank Mod.cs(30,5) : error CS1519: Invalid token '}' in class, struct, or interface member declaration
My code:
View attachment 150576

Let me try to break down what's going on here.

You're creating a new object instance inside of a namespace to serve as your class (weapon). To do so, you need to extend it from the parent class (which you have done), and then override the requisite function definitions.

For weapons in particular you'll want to define an override to the SetDefault method, ala:
Code:
public override void SetDefaults() {
    //Contents Here
}

Inside here, you define the key properties of your weapon such as damage, requirements, etc.

You need not define an image path as the mod code will automatically look for a matching file to your weapon of the same name.

As others have said, spend some time and look through the example mod to see how the basics are done before trying to jump into anything too crazy.
 
In the first post, there is a download link to the decompiled files. Specifically, here:
In the ExampleMod I can't find where the items are linking to their sprites, like in my code
[doublepost=1480891643,1480891542][/doublepost]
Let me try to break down what's going on here.

You're creating a new object instance inside of a namespace to serve as your class (weapon). To do so, you need to extend it from the parent class (which you have done), and then override the requisite function definitions.

For weapons in particular you'll want to define an override to the SetDefault method, ala:
Code:
public override void SetDefaults() {
    //Contents Here
}

Inside here, you define the key properties of your weapon such as damage, requirements, etc.

You need not define an image path as the mod code will automatically look for a matching file to your weapon of the same name.

As others have said, spend some time and look through the example mod to see how the basics are done before trying to jump into anything too crazy.
So, what am I doing wrong? According to your helpful post, my code should all ready have linked to my sprite, but I got the error
 
The error has nothing to do with the sprite, It's simply an invalid line.

Here's what you wrote:
Code:
Terraria.ModLoader.ModSources.TheDankMod.Items.Weapons.TheFeministsBlade.png

To a computer, what you're telling it to do is go into the class named TheFeministsBlade Located in namespace Terraria.ModLoader.ModSources.TheDankMod.Items.Weapons and access the property named png. See the problem here?

In truth, you need not even try to define the path to the .png file, the mod system will try to load it automatically in SetDefaults(). What you need to do is define a class instance for your weapon, and then override SetDefaults, nothing else is needed. Run the following code bit and tell me if it compiles:

Code:
namespace TheDankMod.Items.Weapons {

    public class TheFeministsBlade : ModWeapon {
        
        public override void SetDefaults() {

        }

    }

}

Even though the following will do nothing, this will at least show you why the line has a problem.
 
The error has nothing to do with the sprite, It's simply an invalid line.

Here's what you wrote:
Code:
Terraria.ModLoader.ModSources.TheDankMod.Items.Weapons.TheFeministsBlade.png

To a computer, what you're telling it to do is go into the class named TheFeministsBlade Located in namespace Terraria.ModLoader.ModSources.TheDankMod.Items.Weapons and access the property named png. See the problem here?

In truth, you need not even try to define the path to the .png file, the mod system will try to load it automatically in SetDefaults(). What you need to do is define a class instance for your weapon, and then override SetDefaults, nothing else is needed. Run the following code bit and tell me if it compiles:

Code:
namespace TheDankMod.Items.Weapons {

    public class TheFeministsBlade : ModWeapon {
       
        public override void SetDefaults() {

        }

    }

}

Even though the following will do nothing, this will at least show you why the line has a problem.

Yeah, no need to tell it where the image is as long as it is in the same folder as the cs file. It will find it automatically.
I recommend you have the images and cs files in the same folder. It helps a lot.
 
The error has nothing to do with the sprite, It's simply an invalid line.

Here's what you wrote:
Code:
Terraria.ModLoader.ModSources.TheDankMod.Items.Weapons.TheFeministsBlade.png

To a computer, what you're telling it to do is go into the class named TheFeministsBlade Located in namespace Terraria.ModLoader.ModSources.TheDankMod.Items.Weapons and access the property named png. See the problem here?

In truth, you need not even try to define the path to the .png file, the mod system will try to load it automatically in SetDefaults(). What you need to do is define a class instance for your weapon, and then override SetDefaults, nothing else is needed. Run the following code bit and tell me if it compiles:

Code:
namespace TheDankMod.Items.Weapons {

    public class TheFeministsBlade : ModWeapon {
       
        public override void SetDefaults() {

        }

    }

}

Even though the following will do nothing, this will at least show you why the line has a problem.
It did not change anything:
Missing mod: TheDankMod/Items/Weapons/TheFeministsBlade
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
[doublepost=1480898545,1480898507][/doublepost]
Yeah, no need to tell it where the image is as long as it is in the same folder as the cs file. It will find it automatically.
I recommend you have the images and cs files in the same folder. It helps a lot.
I did that...

Missing mod: TheDankMod/Items/Weapons/TheFeministsBlade
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
[doublepost=1480899003][/doublepost]
The error has nothing to do with the sprite, It's simply an invalid line.

Here's what you wrote:
Code:
Terraria.ModLoader.ModSources.TheDankMod.Items.Weapons.TheFeministsBlade.png

To a computer, what you're telling it to do is go into the class named TheFeministsBlade Located in namespace Terraria.ModLoader.ModSources.TheDankMod.Items.Weapons and access the property named png. See the problem here?

In truth, you need not even try to define the path to the .png file, the mod system will try to load it automatically in SetDefaults(). What you need to do is define a class instance for your weapon, and then override SetDefaults, nothing else is needed. Run the following code bit and tell me if it compiles:

Code:
namespace TheDankMod.Items.Weapons {

    public class TheFeministsBlade : ModWeapon {
       
        public override void SetDefaults() {

        }

    }

}

Even though the following will do nothing, this will at least show you why the line has a problem.
Why can't I find anything like that in the ExampleMod??????
 
It did not change anything:
Missing mod: TheDankMod/Items/Weapons/TheFeministsBlade
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
[doublepost=1480898545,1480898507][/doublepost]
I did that...

Missing mod: TheDankMod/Items/Weapons/TheFeministsBlade
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
[doublepost=1480899003][/doublepost]
Why can't I find anything like that in the ExampleMod??????
Come to the discord, you seem confused about something.
 
Back
Top Bottom