tModLoader Official tModLoader Help Thread

Thanks for you help but I , don't know what that "Custom Iteminfo" is and how it works. And I'm sorry to say that but the Sourcecode didn't help at all but your mod looks Interesting.
Well ItemInfo allows you to store any info you want, and it can be linked to an item. The item can be saved and loaded as well. If you look here, you can see some of the info the mod is storing (and using) For example, you could set enhanced to true with the following: (if the set modifier was actually public)
Code:
item.GetModInfo<ElementalInfo>(mod).enhanced = true;
Then anywhere in your mod, you could use that data. For example, to check if that bool is true:
Code:
if (item.GetModInfo<ElementalInfo>(mod).enhanced)
{
//do whatever
}
I hope you see what I mean
 
Well ItemInfo allows you to store any info you want, and it can be linked to an item. The item can be saved and loaded as well. If you look here, you can see some of the info the mod is storing (and using) For example, you could set enhanced to true with the following: (if the set modifier was actually public)
Code:
item.GetModInfo<ElementalInfo>(mod).enhanced = true;
Then anywhere in your mod, you could use that data. For example, to check if that bool is true:
Code:
if (item.GetModInfo<ElementalInfo>(mod).enhanced)
{
//do whatever
}
I hope you see what I mean
Sorry but I don't understand it. And how would I save Vanilla information like a shotmethod?
 
Well this will be a hole lot of work as well because 90% of the Items in my mod will be based on Vanilla ones. (Upgrades)
How can I find the shot method as of this will be the hardest part to do by myself.
The shoot stuff seems to happen in the ItemCheck method.
 
No, not unless you want to go through 3000 items and compile it manually. Anyway, all you need to do is search for the id ,most the results in item.cs or player.cs are what you want. All compressed to the search results window.
I have read it again and I think you misunderstud me, I want to create Stronger Versions of weapons like a Waterbold with higher damage and a recolored Projectil

The shoot stuff seems to happen in the ItemCheck method.
Thanks I'll check that now.
Edit: ItemCheck doesn't have any information about some Items like "Water Bold"
 
I have read it again and I think you misunderstud me, I want to create Stronger Versions of weapons like a Waterbold with higher damage and a recolored Projectil


Thanks I'll check that now.
Edit: ItemCheck doesn't have any information about some Items like "Water Bold"
Water Bolt doesn't have a custom shoot. It just shoots 1 thing.
 
Why do my animated projectiles only have 2 frames when I set them to more?
I put this in the set defaults
Code:
Main.projFrames[projectile.type] = 8;
And this in the Void AI
Code:
projectile.frameCounter++;

if (projectile.frameCounter > 16)
{
    projectile.frame++;
    projectile.frameCounter = 0;
}
if (projectile.frame > 1)
{
   projectile.frame = 0;
}
Also what holdStyle is the nebula blaze?
 
In my holiday, i have think than i do not need post, but when i have see your troll, Elias
Seriously? You question: why my projectile have only 2 frames, you create a code without read?

if (projectile.frame > 1)
{
projectile.frame = 0;
}

In 2 seconds, all people can see your error ^^' re-read before that , xD


Ah ah ah xD

For Nebula blaze, i think than you can test very fast without post this question ^^
 
In my holiday, i have think than i do not need post, but when i have see your troll, Elias
Seriously? You question: why my projectile have only 2 frames, you create a code without read?

if (projectile.frame > 1)
{
projectile.frame = 0;
}

In 2 seconds, all people can see your error ^^' re-read before that , xD


Ah ah ah xD

For Nebula blaze, i think than you can test very fast without post this question ^^
Sorry if I look like a :redspin:ing noob, I just didn't know that's what it did based on the examples I saw.
Also
i have see your troll
I wasn't trolling...:sigh:
 
Humor. When you copy/paste a code very not complex and very light, read and learn, i can understand when you try paste a beam or a boss, but that, this is just 6 lines for animation :p, if you want advance, do not post a code than you have not read before x) (same diagonally, but here, you have just not read the code than you have paste :p )
 
I need help with NPC AI, I want to make it so my NPC will jump up and try to land on the player, how do I do this?
I also want to make it play a custom animation when it does this.
EDIT: I got the npc to behave like I want, but I still need help with the animation part.
 
Last edited:
can you call resources from other mods to use on yours? For example use an item that you get in "x" mod as part of a crafting recipe for an item of your mod?
 
Last edited:
Is it possible to control the player, such as making it move about randomly? I found some methods that suggest this is possible, such as Player.JumpMovement or Player.KeyHoldDown, but no luck so far.
 
Quick question, how do I animate a sword weapon while it's being swung? The item image is animated just fine using this:

Code:
public override DrawAnimation GetAnimation()
 {
 return new DrawAnimationVertical(10, 4);
 }

But how do I make the animation also occur while the sword is being swung?
 
Why can't I publish?
Error :
Tip: Adding a homepage to build.txt will make your mod more appealing.
Mod Browser NOT updated. Change version number if you wish to update your mod!

This is my build.txt.

author = --Elias--
version = 1.0
displayName = Nightmare Mod
homepage = http://forums.terraria.org/index.php?threads/released-wip-the-nightmare-mod.46857/
hideCode = true
hideResources = true
includeSource = false
buildIgnore = *.csproj, *.user, obj\*, bin\*, .vs\*
includePDB = true
 
Back
Top Bottom