Standalone [1.3] tModLoader - A Modding API

Put all those files and folders into C:\Program Files (x86)\Steam\steamapps\common\Terraria
So that patch_info is in the same folder as Terraria.exe
Next copy Terraria.exe into the Vanilla folder, then run patch.bat
Now you should have a modded file in tModLoader
I must be doing this wrong because nothing is working
 
I must be doing this wrong because nothing is working
Copy vanilla Terraria.exe (That in C:\Program Files (x86)\Steam\steamapps\common\Terraria folder)
Drop it in "Vanilla" folder (That in ModLoader v0.3.1 folder)
Run patch.bat
Copy patched Terraria.exe (That in tModLoader folder, in which ModLoader v0.3.1 folder)
Replace it with vanilla Terraria.exe (That in C:\Program Files (x86)\Steam\steamapps\common\Terraria folder)
[DOUBLEPOST=1438973910,1438973776][/DOUBLEPOST]When they begin to properly read the instructions?
 
Last edited:
@bluemagic123 how to spawn mod npc? This one not work:
Code:
NPC.NewNPC((int)(Main.mouseX + Main.screenPosition.X), (int)(Main.mouseY + Main.screenPosition.Y), ModNPC.StrangeSkeleton);
 
@bluemagic123 how to spawn mod npc? This one not work:
Code:
NPC.NewNPC((int)(Main.mouseX + Main.screenPosition.X), (int)(Main.mouseY + Main.screenPosition.Y), ModNPC.StrangeSkeleton);
To get the ID of your NPC, try mod.NPCType("StrangeSkeleton").
Also, let me know how it works. I was going to release a bugfix update very soon, but I guess I'll wait to see how this works out.
 
To get the ID of your NPC, try mod.NPCType("StrangeSkeleton").
Also, let me know how it works. I was going to release a bugfix update very soon, but I guess I'll wait to see how this works out.
When i using item nothing happens.
[DOUBLEPOST=1438984171,1438983682][/DOUBLEPOST]Also truing use:

Code:
        public bool SpawnNPC(int x, int y, int SP)
        {
            Player P = Main.player[SP];
            bool Meteor = P.ZoneMeteor;
            if (Main.dayTime && Main.rand.Next(2) == 1) return true;
            return false;
        }
But nothing happens
 
When i using egg nothing happens.
[DOUBLEPOST=1438984171,1438983682][/DOUBLEPOST]Also truing use:

Code:
        public bool SpawnNPC(int x, int y, int SP)
        {
            Player P = Main.player[SP];
            bool Meteor = P.ZoneMeteor;
            if (Main.dayTime && Main.rand.Next(2) == 1) return true;
            return false;
        }
But nothing happens
What's that SpawnNPC method for? There isn't any hook for that yet.
But for your spawn egg, it looks like I might have to do some of my own testing to see what's going wrong.

In the meantime, here's a small bugfix update:
v0.3.1.1
-Finally fixed bug where "Build + Reload" wouldn't unload mods
-Hopefully fixed dll reference system
-Autoloading now occurs before manual loading
-Added README to installation
 
Hopefully fixed dll reference system
Nope, after deleting my .dll in the Terraria folder I get this error again
Code:
Could not load file or assembly 'GIMJsOverhaul, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
   at GIMJsOverhaulEvents.GIMJsOverhaulEvents.Load()
   at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)

-Added README to installation
Nice, will help people out.

By the way, I'm still having the projectile issue after your small update.
 
Nope, after deleting my .dll in the Terraria folder I get this error again
Code:
Could not load file or assembly 'GIMJsOverhaul, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
   at GIMJsOverhaulEvents.GIMJsOverhaulEvents.Load()
   at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)


Nice, will help people out.

By the way, I'm still having the projectile issue after your small update.
Darn, looks like I'll actually have to test that out myself then.
 
Hey. Great work on this so far. I'm surprised at how flexible it can be even in this early state.

One thing though, do you know of a way to "safely" place/remove tiles from a script (i.e. have an item that does it) in a way that forces the tiles to update and not look bad? I've been trying to find a method I can call but they all seem to be inaccessible.
 
Hey. Great work on this so far. I'm surprised at how flexible it can be even in this early state.

One thing though, do you know of a way to "safely" place/remove tiles from a script (i.e. have an item that does it) in a way that forces the tiles to update and not look bad? I've been trying to find a method I can call but they all seem to be inaccessible.
To place a tile you can use this method from the WorldGen class:
public static bool PlaceTile(int i, int j, int type, bool mute = false, bool forced = false, int plr = -1, int style = 0)

To remove a tile you can use this, also from the WorldGen class:
public static void KillTile(int i, int j, bool fail = false, bool effectOnly = false, bool noItem = false)

Also, if you just want to update a tile, you can use this method:
public static void TileFrame(int i, int j, bool resetFrame = false, bool noBreak = false)

If you just want to update a tile and all 8 surrounding tiles, there's this method:
public static void SquareTileFrame(int i, int j, bool resetFrame = true)

Ever since the update I released earlier today, the WorldGen class is now public.
 
Ah, so WorldGen is no longer internal. I didn't notice that in the patch notes. That is immensely useful! Thanks!
 
Sooo, can anyone tell me how to make basic mobs? ;)
You would make them in a similar way basic items could be made in v0.1. Override the ModNPC class, override SetDefaults to set properties, and that kind of stuff. However, since I haven't actually tested NPCs yet, it's completely possible that they won't work. (I'll most likely test them before I release the next version.)
 
You would make them in a similar way basic items could be made in v0.1. Override the ModNPC class, override SetDefaults to set properties, and that kind of stuff. However, since I haven't actually tested NPCs yet, it's completely possible that they won't work. (I'll most likely test them before I release the next version.)
Like that?

Code:
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace FenrisNostalgia.NPCs.Dredmor
{
    public class Diggle : ModNPC
    {
        public override void SetDefaults()
        {
            npc.frameCounter = 15;
            npc.width = 18;
            npc.height = 40;
            npc.value = 8000;
            npc.aiStyle = 3;
            npc.damage = 5;
            npc.defense = 0;
            npc.soundHit = 2;
            npc.soundKilled = 2;
            npc.lifeMax = 20;
            npc.scale = 1;
        }
    }
}
 
Last edited:
Heya guys. Just a thought here since Blue was looking for stuff based on walls. Has anyone figured out how to make regular paint show up on a wall? I was looking for a way to make all colors of paint show up on a wall and I've been messing with the example Wall's values (after making it pure white) and it seems that no normal paint color will apply to them. All Deep will, but no regular paint at all. Any ideas?
 
Back
Top Bottom