Standalone [1.3] tModLoader - A Modding API

How can I make mods in terraria? I have been looking everywhere but I can't find anything about making mods and I really want to make mods.
 
How can I make mods in terraria? I have been looking everywhere but I can't find anything about making mods and I really want to make mods.
Start by learning some C# if you want to mod. Look up some tutorials and download Visual Studio 2015 Community edition (you can also download another programming tool, but I'd advice you to go with Visual Studio). You can then stroll through the example mod and change some values to see what they do...
 
sneak peak of something from v0.7:
Capture 2015-11-15 21_15_24.png
 
The game wasn't capable of loading the custom chains and grappling hooks (the ends, I mean).
Now it's possible. also, with ModProjectile hooks, it's possible to do some really cool stuff :)
 
Oh, haha I was able to get it to work for some reason..
R7wCQUA.png

It's nice to have some full support, though, because it was hellish to get it to work! ^^
 
Well everything that tModLoader makes easier is possible with the smallest amount of source modding. tModLoader, however, makes the process much, MUCH, shorter and user-friendly.
 
True, which is why I appreciate you guys working on it so much ;)
I get dizzy strolling through the source code once in a while, since it's so overwhelmingly much sometimes :confused:
 
Speaking of the source code, has anyone had any issues decompiling it? I can read most classes fine within ILSpy itself, but attempting to decompile/export the whole archive causes my computer to freeze up; the longest I've left it running is about 3 hours before I needed to use the machine again. I'm on a mid-range machine from a few years ago, but I wouldn't expect it to be so slow that nothing else works for several hours while decompiling!
 
Speaking of the source code, has anyone had any issues decompiling it? I can read most classes fine within ILSpy itself, but attempting to decompile/export the whole archive causes my computer to freeze up; the longest I've left it running is about 3 hours before I needed to use the machine again. I'm on a mid-range machine from a few years ago, but I wouldn't expect it to be so slow that nothing else works for several hours while decompiling!
It also takes my pc a while to decompile some of the files, but 3 hours?... My PC (laptop) is 3-4 years old I think and it takes a maximum time of 15-20 minutes to decompile the .cs files (especially the NPC one).
 
Speaking of the source code, has anyone had any issues decompiling it? I can read most classes fine within ILSpy itself, but attempting to decompile/export the whole archive causes my computer to freeze up; the longest I've left it running is about 3 hours before I needed to use the machine again. I'm on a mid-range machine from a few years ago, but I wouldn't expect it to be so slow that nothing else works for several hours while decompiling!
I've left a 4GB machine running for 24 hrs. (Ram is the limiting factor I think, unless you have an SSD.) Didn't work. Try another machine if you can, or change the configureation of "SingleDecompileThread" in \tModLoader\setup\bin\setup.vshost.exe.config from False to True.
 
It also takes my pc a while to decompile some of the files, but 3 hours?... My PC (laptop) is 3-4 years old I think and it takes a maximum time of 15-20 minutes to decompile the .cs files (especially the NPC one).
Yep I have a laptop from 'bout 12/25/9-10 and it works perfect
 
You are just making the sprite then? You'll want to make the projectile and the dust sprites. You'll want to convert Projectile_280.xnb and Dust.xnb to .png (XNB to PNG Converter), then find the 170th dust (I think it's this one
ksPFNJC.png
), go into your image editing program and copy that into a 10x30 image, use the image adjustment commands to change the hue to silver, save it (in the mod soures folder). Do the same for the projectile.

If you need help with the programming of the buff, projectile, or item, let me know where you are stumped.


It wouldn't be part of ModPlayer, but it's not that high a priority right now.


Oh, here are some snippets of things you can do, mix and match as you like, they should all be pretty self explanatory. Check the wiki for which ones go with what.
Code:
player.aggro += 300;
player.meleeCrit += 17;
player.meleeDamage += 0.22f;
player.meleeSpeed += 0.15f;
player.moveSpeed += 0.15f;
player.rangedCrit += 7;
player.rangedDamage += 0.16f;
player.maxMinions++;
player.minionDamage += 0.22f;
player.statManaMax2 += 60;
player.manaCost -= 0.15f;
player.magicCrit += 7;
player.magicDamage += 0.07f;
How do you do what the worm scarf does?
 
How do you do what the worm scarf does?
You can modify the 'endurance' variable from the player. Say you've got the following when updating your accessory (for example):
Code:
player.endurance += 0.25F;
This basically means that 25% of damage taken (from any source) is negated.
 
Speaking of the source code, has anyone had any issues decompiling it? I can read most classes fine within ILSpy itself, but attempting to decompile/export the whole archive causes my computer to freeze up; the longest I've left it running is about 3 hours before I needed to use the machine again. I'm on a mid-range machine from a few years ago, but I wouldn't expect it to be so slow that nothing else works for several hours while decompiling!
My almost-2-year-old labtop freezes for 2-3 hours trying to decompile it, so it's perfectly normal.
 
What code I can use to add a item spawn for a projectile?
So you mean like how a Wooden Arrow spawns itself when it hits a block? In that case you would call (in the projectile coding)
Code:
public override void Kill(int timeLeft)
then do an item spawn. I think you use Item.NewItem (just guessing :)), but I'm pretty inexperienced myself. :/
 
Back
Top Bottom