Standalone [1.3] tModLoader - A Modding API

You should still have the source, right? When you install 0.7, your 0.6 mods won't load, but you just need to run the build command again. There are a couple things that changed in 0.7, but you can fix the code yourself or post the error and we can help.

To install 0.7, just follow the instructions in the README.txt file in the download zip. There is no need to "uninstall" 0.6.
Yeah, I've just downloaded them and took a quick look, noticed that tmodloader is now not installing, but covering. That should do the trick no matter how 0.6 was placed.
Another thing is, since the source code have been released, that how should I link tmodloader as a reference? Just like I can link terraria.exe as a reference, there are lots of hooks in tmodloader, so I think I might have a chance to use tmodloader in VS?
[DOUBLEPOST=1452993133,1452992806][/DOUBLEPOST]Oh, I entered the game and rebuild my mod. It works just like a charm! That's cool anyways.
 
Yeah, I've just downloaded them and took a quick look, noticed that tmodloader is now not installing, but covering. That should do the trick no matter how 0.6 was placed.
Another thing is, since the source code have been released, that how should I link tmodloader as a reference? Just like I can link terraria.exe as a reference, there are lots of hooks in tmodloader, so I think I might have a chance to use tmodloader in VS?
[DOUBLEPOST=1452993133,1452992806][/DOUBLEPOST]Oh, I entered the game and rebuild my mod. It works just like a charm! That's cool anyways.
Just reference the Terraria.exe. simpler than seeing up the source code.
 
Just reference the Terraria.exe. simpler than seeing up the source code.
I'm actually curious about how I am supposed to modify the maxlife of a player in 0.7 like the vanilla life crystal? bluemagic123 said it may be possible in 0.7, and I discovered there are lots of hooks about player in 0.7. So is that possible now?
[DOUBLEPOST=1452997695,1452997500][/DOUBLEPOST]Wow, so I tried to link terraira.exe, then VS said it can't be looked in objective browser... any idea?
 
I'm actually curious about how I am supposed to modify the maxlife of a player in 0.7 like the vanilla life crystal? bluemagic123 said it may be possible in 0.7, and I discovered there are lots of hooks about player in 0.7. So is that possible now?
It's possible by modifying the value of player.statLifeMax2 in one of the update hooks.
 
upload_2016-1-17_10-31-36.png

like this I suppose?
[DOUBLEPOST=1452998165,1452997892][/DOUBLEPOST]
It's possible by modifying the value of player.statLifeMax2 in one of the update hooks.
oh, but, should it be a status... well, I don't know how to describe it. Maybe when I used some sortta items then I get my maxlife increased. This is a kind of status and a kind of datas, that will be recorded by the game. The game has known that I used this kind of item and my maxlife gets increased. Then maybe next a few times I tried to use this kind of trick, it gets a limit, like the life crystal? Life crystal can only make it to 400... My words get quiet ambiguous, hope you get what I mean.

EDIT, wait, I recall the last time I looked up in the reference and there are maxlife and maxlife2 like you said. So in a word, I mean, could I create something like the life crystal?
 
I'm actually curious about how I am supposed to modify the maxlife of a player in 0.7 like the vanilla life crystal? bluemagic123 said it may be possible in 0.7, and I discovered there are lots of hooks about player in 0.7. So is that possible now?
[DOUBLEPOST=1452997695,1452997500][/DOUBLEPOST]Wow, so I tried to link terraira.exe, then VS said it can't be looked in objective browser... any idea?
I'm not sure about how far you can go in the object browser, but referencing the exe should get you access to public methods and variables in the auto complete.

If you actually want to see the source, you can download the github project, run setup, then reference the csproj file after it does it's thing.
 
I'm not sure about how far you can go in the object browser, but referencing the exe should get you access to public methods and variables in the auto complete.

If you actually want to see the source, you can download the github project, run setup, then reference the csproj file after it does it's thing.
Em... of course I get no interest in the source codes... I don't deem a potential that I can understand what's inside!:)
I simply think that if I get it as a reference, then I can see what I will search on the wiki in my VS, and that would be convenient. Anyways, if it doesn't work, I may still put wiki with me.
[DOUBLEPOST=1452998655,1452998591][/DOUBLEPOST]you see, it appears to be like this:
upload_2016-1-17_10-44-25.png
 
Em... of course I get no interest in the source codes... I don't deem a potential that I can understand what's inside!:)
I simply think that if I get it as a reference, then I can see what I will search on the wiki in my VS, and that would be convenient. Anyways, if it doesn't work, I may still put wiki with me.
[DOUBLEPOST=1452998655,1452998591][/DOUBLEPOST]you see, it appears to be like this:
View attachment 92784
Probably delete the vanilla reference. You should be able do things with that, does the source code you are working with have using Terraria.tmodloader yet?
 
Probably delete the vanilla reference. You should be able do things with that, does the source code you are working with have using Terraria.tmodloader yet?
Code:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Enums;
using Terraria.ID;
using Terraria.DataStructures;
using Terraria.ModLoader;
using Terraria.ObjectData;
using Microsoft.Xna.Framework.Graphics;
you mean these in my source codes?
upload_2016-1-17_10-51-55.png

you see, when I link terraria1308.exe as a reference, I can actually see the items in object browser, but now I'm liking terraria.exe, nothing was added.
and when I detele the vanilla exe, it works fine:
upload_2016-1-17_10-54-22.png

it seems they're contradictory... I'm wondering whether deleting vanilla exe will make some vanilla references? Or vanilla exe can be replaced by this one?
 
This mod sucks my wifi dry everytime I open Terraria. And it also crashes the game once I go offline. Also there is a Mod on the list of mods that is named "mlg". It crashes my game everytime I go to it's wiki? Anybody else having the same problems?
 
Last edited:
This mod sucks my wifi dry everytime I open Terraria. And it also crashes the game once I go offline. Also there is a Mod on the list of mods that is named "mlg". It crashes my game everytime I go to it's wiki? Anybody else having the same problems?

I'm having the same problem with that mod too whenever I go look at the info of the mod it crashes Terraria
 
When opening Terraria with tmodloader installed, I recieve errors for every mod, and tmodloader disables them. I am using Linux, and it appears others who've gotten this error also are using Linux.

INTERNAL configuration error: failed to get configuration 'system.diagnostics'
at System.Diagnostics.DiagnosticsConfiguration.get_Settings () [0x00000] in <filename unknown>:0
at System.Diagnostics.TraceImpl.InitOnce () [0x00000] in <filename unknown>:0
at System.Diagnostics.TraceImpl.get_Listeners () [0x00000] in <filename unknown>:0
at System.Diagnostics.TraceImpl.get_ListenersSyncRoot () [0x00000] in <filename unknown>:0
at System.Diagnostics.TraceImpl.WriteLine (System.String message, System.String category) [0x00000] in <filename unknown>:0
at System.Diagnostics.Trace.WriteLine (System.String message, System.String category) [0x00000] in <filename unknown>:0
at MP3Sharp.Decoding.Bitstream.isSyncMark (Int32 headerstring, Int32 syncmode, Int32 word) [0x00000] in <filename unknown>:0
at MP3Sharp.Decoding.Bitstream.syncHeader (SByte syncmode) [0x00000] in <filename unknown>:0
at MP3Sharp.Decoding.Header.read_header (MP3Sharp.Decoding.Bitstream stream, MP3Sharp.Decoding.Crc16[] crcp) [0x00000] in <filename unknown>:0
at MP3Sharp.Decoding.Bitstream.readNextFrame () [0x00000] in <filename unknown>:0
at MP3Sharp.Decoding.Bitstream.readFrame () [0x00000] in <filename unknown>:0
at MP3Sharp.MP3Stream.ReadFrame () [0x00000] in <filename unknown>:0
at MP3Sharp.MP3Stream.Read (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0
at System.IO.Stream.CopyTo (System.IO.Stream destination, Int32 bufferSize) [0x00000] in <filename unknown>:0
at System.IO.Stream.CopyTo (System.IO.Stream destination) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.Stream:CopyTo (System.IO.Stream)
at Terraria.ModLoader.ModLoader.LoadMod (Terraria.ModLoader.IO.TmodFile modFile, Terraria.ModLoader.BuildProperties properties) [0x00000] in <filename unknown>:0
at Terraria.ModLoader.ModLoader.LoadMods () [0x00000] in <filename unknown>:0

The classes in the module cannot be loaded.
at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
at Terraria.ModLoader.ModLoader.LoadMod (Terraria.ModLoader.IO.TmodFile modFile, Terraria.ModLoader.BuildProperties properties) [0x00000] in <filename unknown>:0
at Terraria.ModLoader.ModLoader.LoadMods () [0x00000] in <filename unknown>:0

Because I'm recieving an error that says "filename unknown" in both mods, I believe this is an issue with tmodloader.
 
Last edited:
I can use Main.recipe[ID] to change the recipe, but how to identify ALL recipes in the game at once? :indifferent:
You can use a for loop to loop through all the recipes, or were you after something else?
When I try to download the example mod it says permission denied (on mediafire)
You'll want to copy + paste the link manually. It happened to me too, seemed to fix it ;)
Can someone make a version that does not need the Steam version of Terraria?
There was a discussion about this a little while ago. If I recall correctly, @bluemagic123 will need someone to compile the GoG tModLoader version so that the steam dll is not needed(?).
 
I have few questions
1. Is it possible to modify the items dropped from vanilla treasure bags (For example I want to make WoF Bag drop Imperial Flesh)
2. How can I spawn my summon at the cursor position (I'm using BabySlime AI) and if I can change it's texture (e.g. Honey Slime Staff will be yellow slimy)
Thanks in advance
 
You can use a for loop to loop through all the recipes, or were you after something else?

You'll want to copy + paste the link manually. It happened to me too, seemed to fix it ;)

There was a discussion about this a little while ago. If I recall correctly, @bluemagic123 will need someone to compile the GoG tModLoader version so that the steam dll is not needed(?).
I want to remove all recipes from the game and no tsort out every one of them :naughty:
 
Back
Top Bottom