Standalone [1.3] tModLoader - A Modding API

does anyone else have an error with their tiles in v0.6? when I build my mod it says that mapname or mapColor don't exist in current context.
The system for displaying tiles on maps was revamped in order to take way less memory. There's information on it in the documentation, and the ExampleMod is updated with the new system.
 
v0.6
-Proofed ModRecipe methods against modder mistakes
-Mac support
-.cs files are no longer saved as .tmod resources (woops!)
-Made mods compatible cross-platform
-Added support for building .dll files as mods
-Added Unload hook for Mod
-Revamped how minimap handles mod tiles and walls to cut down minimap's RAM usage
-Fixed bug that made .twld files larger than they had to be
-Made some private Projectile fields public
-Fixed bug where Jungle Temple door cannot be unlocked
-Fixed bug with sign GUI
-Fixed bug where cloud saves are not separate from vanilla cloud saves
-Added mod browser - an easy way to upload / download mods
-Basic buff support
-Added support for platform-like tiles
-Fixed bug where miscellaneous custom sounds don't work
-Improved saving for mannequins and item frames with modded items
-Gave ModDusts their own types
-Added hooks for vanity effects for armor sets
-Linux support
-Made a fancy installer
-Partial music support
-Added "Open Mods Folder" button to Mods menu
-Added support for animating vanilla tiles

Some features in action: http://forums.terraria.org/index.php?threads/1-3-tmodloader-a-modding-api.23726/page-162#post-777556

Oh, my, god, it's finally released! Hah, take that, school! I'm still able to scrap together some free time!

The first thing I want to say is, I fully expect Murphy's Law to apply to this update. I expect everything to go wrong, crash, and burn. So, let me know when you run into any problems.

With that out of the way, this update mostly focuses on internal improvements. It's compatible with Mac and Linux now, performance was improved a lot, and many bugs were fixed. Many miscellaneous features were also added here and there. The update notes should have everything. I feel like this is a major turning point for tModLoader (even if this update ends up with a rough start). I estimate tModLoader is about half complete now.

Do note that this update will require changes to several parts of your mod code. Specifically, the dust and map tile systems have been redone.

Anyways, the next update will focus on the ModPlayer class. Once the next update is complete, all the features that most people would want to use, excluding world-related hooks, will be complete. However, the next update will also take a really long time, due to three reasons:
  1. School, obviously.
  2. Drawing-related hooks for players. tAPI did this through a PlayerLayer system; however, this involved extensive changes to the source code, which I wanted to avoid. I still haven't thought of a good alternative yet :/
  3. The ExampleMod. With the next update, I really want to add very cool stuff to the ExampleMod, so I might end up getting carried away :p
I was going to say something more, but I forgot what...
nice work with that!


I keep forgetting to get screenshots of the broken gun...
 
hello, i'm new to these forums, but not to terraria. i downloaded tmodloader for mac, but im not sure how to proceed from there. am i supposed to open the installer.exe or the install file in the resources folder? neither is working for me.
 
hello, i'm new to these forums, but not to terraria. i downloaded tmodloader for mac, but im not sure how to proceed from there. am i supposed to open the installer.exe or the install file in the resources folder? neither is working for me.
All the instructions for installation are in README.txt
So go read that.
 
All the instructions for installation are in README.txt
So go read that.
I did, I do not understand the bit that says "Then you must navigate to this directory in the terminal and run "mono Installer.exe". Sorry that i'm a noob a with the terminal, but I can't get it this installer to work
 
I did, I do not understand the bit that says "Then you must navigate to this directory in the terminal and run "mono Installer.exe". Sorry that i'm a noob a with the terminal, but I can't get it this installer to work
Basically, do to the weird way Macs work, the only way to get this to run is to go to run it from the Terminal. Unfortunately I can't distribute any .command or .sh file, because then you'd need the terminal in order to allow it to run.
So what you need to do is use the "cd" command to navigate to the directory that contains Installer.exe. Then once you get there you can run that command.
 
Basically, do to the weird way Macs work, the only way to get this to run is to go to run it from the Terminal. Unfortunately I can't distribute any .command or .sh file, because then you'd need the terminal in order to allow it to run.
So what you need to do is use the "cd" command to navigate to the directory that contains Installer.exe. Then once you get there you can run that command.
thank you i will try this. btw awesome work on this modloader thing :)
 
The player.head variable refers to a headSlot, and this is separate from itemid. Find them here: https://github.com/bluemagic123/tModLoader/wiki/Vanilla-Item-Field-Values

Thank you, it works perfectly now! I think I'm going to have to bookmark that google doc...

I once saw a texture for the body of a robe, which included the legs (in the same texture). This seemed to work... I'm currently looking for the texture in question and I'll get back to you when I find it.

EDIT:
I found the texture, but it's part of the ThoriumMod+ mod, so I'll ask permission to show it here first.

I found the image you're talking about (well, a similar one at least - silk tabard). I did that but there are a couple of frames that aren't quite right (e.g when flying upwards, it uses the standing frame for the legs instead of the flying/falling one). Here's what I mean:
FB7bAXZ.png

On the left is the vanilla ruby robe, on the right is the robe I added, with legs pasted into the robe_Body.png image. In both images I am flying upwards, but only in the vanilla robe are the legs spread apart as they should be. You can see the characters actual pants texture poking out from under the robe.

It'll do for now I guess, until I feel like fiddling with the texture to fix it manually...
 
Last edited:
Thank you bluemagic, i managed to install it. however i seem to be having issues with building my mods. i visited your documentation of build.txt but i didn't really understand it. Then again, I might just be an idiot.
 
Hey @bluemagic123 @jopojelly and @Gorateron would a mod with a bunch of modded crafting recipes be good for the mod browser? Or would it not be unique and/or good enough?
It would depend on what the recipes are.

Thank you bluemagic, i managed to install it. however i seem to be having issues with building my mods. i visited your documentation of build.txt but i didn't really understand it. Then again, I might just be an idiot.
What errors are you getting exactly? First we need to see if it's just a mistake-error or the kind of error that actually can't be fixed.
 
It would depend on what the recipes are.


What errors are you getting exactly? First we need to see if it's just a mistake-error or the kind of error that actually can't be fixed.
It would mainly be recipes that give you some of the best items in the game. Or maybe I could just make it so that you could get most or all of the crafting materials so that people can make what they want. Plus the second one could help with testing other mods.
 
What errors are you getting exactly? First we need to see if it's just a mistake-error or the kind of error that actually can't be fixed.
Screen Shot 2015-10-24 at 5.39.10 PM.png
is what is showing up when i try to load a mod, including the examplemod
[DOUBLEPOST=1445733932,1445733698][/DOUBLEPOST]so i think that this is the error that you were talking about on the main page, but i don't know how to pre-compile it
 
It would mainly be recipes that give you some of the best items in the game. Or maybe I could just make it so that you could get most or all of the crafting materials so that people can make what they want. Plus the second one could help with testing other mods.
In that case, it would depend on what the recipes require. If they're sensible recipes that don't break balance, it should be fine. But if they're easy, both the example mod and the creative mode mod has commands that let you get any item you want.

View attachment 82642 is what is showing up when i try to load a mod, including the examplemod
Hm. In that case, you'll need to get an IDE for Mono, and compile your mod the same way you would compile any normal program. Then you'll have to place the dll files in your Mod Sources folder, and in build.txt set noCompile to true. Unfortunately, you'll probably have to be familiar with programming (specifically how references work).
 
Back
Top Bottom