Standalone [1.3] tModLoader - A Modding API

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

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...
Woah, nice! I'm going to try out the installer right now :)
So.. ModPlayer support next? ^^
 
Here's some examples:

-Proofed ModRecipe methods against modder mistakes
wSyYgoo.png

-Basic buff support
One of my mods.
-Added support for platform-like tiles
-Added hooks for vanity effects for armor sets
-Made a fancy installer
HXvh7iS.png

-Partial music support
5fVF4dd.png

-Added support for animating vanilla tiles
-Added mod browser - an easy way to upload / download mods

Download:

Upload:

*note, don't publish just because "the button was there!", try to publish once you have something decent that you can be proud of.
 
Last edited:
Here's some examples:

-Proofed ModRecipe methods against modder mistakes
wSyYgoo.png

-Basic buff support
One of my mods.
-Added support for platform-like tiles
-Added hooks for vanity effects for armor sets
-Made a fancy installer
HXvh7iS.png

-Partial music support
5fVF4dd.png

-Added support for animating vanilla tiles
-Added mod browser - an easy way to upload / download mods
Thanks, nice showcase! Should be put in OP :)
 
Let's see what you have.

It's so simple...
Code:
using System;
using System.IO;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace Ersion.NPCs.PrinceSlime {
public class PrinceSlime : ModNPC
{
    public override void SetDefaults()
    {
        npc.name = "Prince Slime";
        npc.displayName = "Prince Slime";
        npc.aiStyle = 15;
        npc.lifeMax = 1000;
        npc.damage = 25;
        npc.defense = 5;
        npc.knockBackResist = 0f;
        npc.width = 174;
        npc.height = 120;
        Main.npcFrameCount[npc.type] = 5;
        npc.npcSlots = 1;
        npc.boss = true;
        npc.noGravity = false;
        npc.noTileCollide = false;
        npc.soundHit = 1;
        npc.soundKilled = 1;
        music = 12;
    }
}}
 
How to change mod info? Wouldn't the mod re-publish with new version if I will rebuild it? And... There will be a lot of nooby mods, am I right?)
 
I have an error when I try to do click build and reload
error CS0006: No se puede encontrar el archivo de metadatos 'TerrariaMac.exe'
 
I have an error when I try to do click build and reload
error CS0006: No se puede encontrar el archivo de metadatos 'TerrariaMac.exe'
Did you do this step: "If you wish to create mods, make sure that you click on the "Setup Modder Environment" button after you install tModLoader" ?

I have updated, and it appears previously downloaded mods are not loaded anymore. I have even redownloaded them, but they are not loaded. Only mods form the ingame browser have worked.
Do you mean they won't load, or they don't show up at all? If they don't load, it's probably the changes we made to dust that the mod dev will need to fix. If they don't show up, then do they still show up in the "\Documents\My Games\Terraria\ModLoader\mods" folder?

How to change mod info? Wouldn't the mod re-publish with new version if I will rebuild it? And... There will be a lot of nooby mods, am I right?)
Mod info is kinda a WIP, plain text is pretty boring so we're looking into what ways we can present modinfo. Also, there is no way to change it yet, I just modified it on the database for the few that i knew about.

It will only republish if you click the publish button. (with an updated version number.)

Nooby mods will be a problem, if someone abuses it, I can just take care of it.

Hey @bluemagic123 @jopojelly doesn't the basic buff support make minions possible since you can make a mount now? Or does it take more?

Edit: Also how do I get the Discord chat room to work? I really can't figure it out lol.

I believe for minions, it should work well enough. Vanilla minions use a boolean value to make sure it dies with the player, so once modPlayer is done, mod minons will die correctly. But without it, it still works fine....I seem to have lost all my code though. oh well.

I've never tried the Discord thing, can't help you there.

Oh yeah guys multiplayer works now and it's so much fun.
Wait.....what? it does??
 
Did you do this step: "If you wish to create mods, make sure that you click on the "Setup Modder Environment" button after you install tModLoader" ?


Do you mean they won't load, or they don't show up at all? If they don't load, it's probably the changes we made to dust that the mod dev will need to fix. If they don't show up, then do they still show up in the "\Documents\My Games\Terraria\ModLoader\mods" folder?


Mod info is kinda a WIP, plain text is pretty boring so we're looking into what ways we can present modinfo. Also, there is no way to change it yet, I just modified it on the database for the few that i knew about.

It will only republish if you click the publish button. (with an updated version number.)

Nooby mods will be a problem, if someone abuses it, I can just take care of it.



I believe for minions, it should work well enough. Vanilla minions use a boolean value to make sure it dies with the player, so once modPlayer is done, mod minons will die correctly. But without it, it still works fine....I seem to have lost all my code though. oh well.

I've never tried the Discord thing, can't help you there.


Wait.....what? it does??
Yeah it's kind of buggy because they can't see the mod items and stuff like that but it actually lets them play with me.
Try it yourself but they can't see the mod items at all.
 
Yeah it's kind of buggy because they can't see the mod items and stuff like that but it actually lets them play with me.

Try it yourself but they can't see the mod items at all.
Exactly.. so it doesn't work..

Edit: Also how do I get the Discord chat room to work? I really can't figure it out lol.
Click the following link.. everything should be self explanatory?
https://discord.gg/0ZhxukM0qzlWKEqe
[DOUBLEPOST=1445710350,1445710159][/DOUBLEPOST]
Nooby mods will be a problem, if someone abuses it, I can just take care of it.
The list isn't exactly friendly for when it becomes really big.. It also should have a search function later on :) And of course.. the mod info is quite important imo.. now you'd still have to go to TCF to read about the mod.. if they've even made a thread
 
Exactly.. so it doesn't work..


Click the following link.. everything should be self explanatory?
https://discord.gg/0ZhxukM0qzlWKEqe
[DOUBLEPOST=1445710350,1445710159][/DOUBLEPOST]
The list isn't exactly friendly for when it becomes really big.. It also should have a search function later on :) And of course.. the mod info is quite important imo.. now you'd still have to go to TCF to read about the mod.. if they've even made a thread
It works as in they can play with my but it doesn't work as in they can't see the modded items. Thanks for the discord thing!
 
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.
 
Back
Top Bottom