• PC NEWS: 1.4.2.3 update is out! More info here. Report bugs here
  • CONSOLE 1.4 NEWS: The current plan is to have Terraria: Journey's End out for Xbox and PlayStation in Q3 2021 (Jul-Sep). Switch will follow shortly afterwards. More info here. Stay up to date with console news here
  • MOBILE NEWS: Stay up to date with the latest mobile news here. Report mobile bugs here

Standalone [1.3] tModLoader - A Modding API

Sgt Efx

Skeletron Prime
@bluemagic123 I tried fixing it by hosting the local server in my laptop while playing on the pc. for now, no crashes.
also, new version in a bit? awesome! gotta stay tuned :)

thx
 

blushiemagic

Retinazer
tModLoader
v0.8:
Server Bugs:
-Fixed server sync bug with OnPickup hook for items
-Fixed server bug where chests are not synced properly
-Fixed bug where Steam servers don't work
-Hopefully fixed ItemLoader.GetAlpha crash for clients on servers
-Hopefully fixed NPCs disappearing on servers? Please?
-Fixed server bug where custom item data is not synced
-Fixed server bug where custom town NPCs do not work
Other Bugs:
-Fixed bug where bottom half of long hair does not draw
-Fixed bug where modded tiles crashed the game in early stages of world generation
-Fixed bug where Start Bag cannot contain vanilla items
-Fixed bug where Mod.GetEquipTexture always returns null
-Mods with sounds now load for people without sound cards
-Fixed NPC.CloneDefaults with buffImmune
-Fixed bug where SetMatch hook doesn't work at all
-Added the ability to build and debug mods from Visual Studio
-Improved the .tmod file format
-Added the ability to support future .tmod file format changes
-Renamed Other.dll to Mono.dll for noCompile mod-building
-Mods can now reference embedded dlls
-Added the ability to compile mods in C# 6
-Made the Mod Browser more secure
-ItemIO can now save items in general, including vanilla items
-Mods menu now displays how much stuff each mod adds
-Detect and display modder errors in LoadCustomData
-Huge performance improvements
-Changed structure of equipment update code to make it easy to create new equipment slots
-Converted some local world generation variables to static fields
-Made Player.jumpSpeed and Player.jumpHeight public
-Made a bunch of Mount fields public
-Added April Fools (sorry this was late)
-Added GlobalRecipe and RecipeAvailable hook for recipes
-Added gender parameter to SetMatch hook for items
-Added generic GetModX accessors for reduced redundancy
-Added OnCraft hook for recipes and items
-Added TileCountsAvailable hook for ModWorld
-Added GetMapBackgroundImage hook for ModPlayer
-Added ModifyBuffTip hook for buffs
-Added option to use constructor for cloned ModPlayers
-Added DrawEffects and CanExplode hooks for tiles
-Made code source files hidden from tModReader based on hideCode instead of hideResources

All mods must be rebuilt! Mods from v0.7.1.1 or earlier will not work!
The format for mod properties and the build.txt version have changed! Please look at the ExampleMod!

Mod properties must be made in the constructor, and you cannot put a "v" in your version number (we do that for you).

Code:
        //old
        //public override void SetModInfo(out string name, ref ModProperties properties)
        //{
        //    name = "TheLuggage";
        //    properties.Autoload = true;
        //    properties.AutoloadGores = true;
        //    properties.AutoloadSounds = true;
        //}
        //new
        public TheLuggage()
        {
            Properties = new ModProperties()
            {
                Autoload = true,
                AutoloadGores = true,
                AutoloadSounds = true
            };
        }

Edit 1: Also, if you had previous versions of tModLoader, you'll need to delete MP3Sharp.dll from your Terraria's Steam folder.

Now that that's out of the way, I don't remember whether I announced this or not, but @Chicken Bones is officially part of the team now! Ever since he's joined, progress has picked up a lot, and there's been tons of internal improvements, so be sure to thank him!

I had an April Fools joke in this update, but it looks like this update got released a bit late. Oh well, hope you guys can enjoy a day-late April Fools joke.

Was I going to say anything else? I don't remember... I guess I'll edit this post as things come up, just as usual.
 
Last edited:

SonicR

Spazmatism
I'm getting the following error when trying to rebuild mods:
error CS1704: An assembly with the same simple name 'MP3Sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null has already been imported. Try removing one of the references or sign them to enable side-by-side.
 

Eldrazi

Eater of Worlds
v0.8:
Server Bugs:
-Fixed server sync bug with OnPickup hook for items
-Fixed server bug where chests are not synced properly
-Fixed bug where Steam servers don't work
-Hopefully fixed ItemLoader.GetAlpha crash for clients on servers
-Hopefully fixed NPCs disappearing on servers? Please?
-Fixed server bug where custom item data is not synced
-Fixed server bug where custom town NPCs do not work
Other Bugs:
-Fixed bug where bottom half of long hair does not draw
-Fixed bug where modded tiles crashed the game in early stages of world generation
-Fixed bug where Start Bag cannot contain vanilla items
-Fixed bug where Mod.GetEquipTexture always returns null
-Mods with sounds now load for people without sound cards
-Fixed NPC.CloneDefaults with buffImmune
-Fixed bug where SetMatch hook doesn't work at all
-Added the ability to build and debug mods from Visual Studio
-Improved the .tmod file format
-Added the ability to support future .tmod file format changes
-Renamed Other.dll to Mono.dll for noCompile mod-building
-Mods can now reference embedded dlls
-Added the ability to compile mods in C# 6
-Made the Mod Browser more secure
-ItemIO can now save items in general, including vanilla items
-Mods menu now displays how much stuff each mod adds
-Detect and display modder errors in LoadCustomData
-Huge performance improvements
-Changed structure of equipment update code to make it easy to create new equipment slots
-Converted some local world generation variables to static fields
-Made Player.jumpSpeed and Player.jumpHeight public
-Made a bunch of Mount fields public
-Added April Fools (sorry this was late)
-Added GlobalRecipe and RecipeAvailable hook for recipes
-Added gender parameter to SetMatch hook for items
-Added generic GetModX accessors for reduced redundancy
-Added OnCraft hook for recipes and items
-Added TileCountsAvailable hook for ModWorld
-Added GetMapBackgroundImage hook for ModPlayer
-Added ModifyBuffTip hook for buffs
-Added option to use constructor for cloned ModPlayers
-Added DrawEffects and CanExplode hooks for tiles
-Made code source files hidden from tModReader based on hideCode instead of hideResources

All mods must be rebuilt! Mods from v0.7.1.1 or earlier will not work!
The format for mod properties and the build.txt version have changed! Please look at the ExampleMod!

Mod properties must be made in the constructor, and you cannot put a "v" in your version number (we do that for you).

Code:
        //old
        //public override void SetModInfo(out string name, ref ModProperties properties)
        //{
        //    name = "TheLuggage";
        //    properties.Autoload = true;
        //    properties.AutoloadGores = true;
        //    properties.AutoloadSounds = true;
        //}
        //new
        public TheLuggage()
        {
            Properties = new ModProperties()
            {
                Autoload = true,
                AutoloadGores = true,
                AutoloadSounds = true
            };
        }

Edit 1: Also, if you had previous versions of tModLoader, you'll need to delete MP3Sharp.dll from your Terraria's Steam folder.

Now that that's out of the way, I don't remember whether I announced this or not, but @Chicken Bones is officially part of the team now! Ever since he's joined, progress has picked up a lot, and there's been tons of internal improvements, so be sure to thank him!

I had an April Fools joke in this update, but it looks like this update got released a bit late. Oh well, hope you guys can enjoy a day-late April Fools joke.

Was I going to say anything else? I don't remember... I guess I'll edit this post as things come up, just as usual.
Awesome, nice work!
Unfortunately my laptop just died, so I'll have to wait a while before I can enjoy this update :'(
 

Piterros990

Duke Fishron
I try to build my mod and this error pops out:
error CS0115: „EpicModpack.EpicModpack.SetModInfo(out string, ref Terraria.ModLoader.ModProperties)”: nie znaleziono odpowiedniej metody do zastąpienia
 

jopojelly

Retinazer
tModLoader
How do I get my custom music to play custom music?
Have you followed the example of ExampleMod? In what situation are we talking?
I try to build my mod and this error pops out:
error CS0115: „EpicModpack.EpicModpack.SetModInfo(out string, ref Terraria.ModLoader.ModProperties)”: nie znaleziono odpowiedniej metody do zastąpienia
Go read bluemagics post, the structure has changed a bit.
 

aerlock

Terrarian
Tmodloader saves are separate from your original saves. And you could do a global npc script that override the spawning of the monsters . If you dont know how to make that PM me and I can do the mod it for you:p
So I'm finally getting around to trying to make my mod happen and I'm having a problem getting Visual Studio setup to work with the mods. All the terraria specific code/calls are being highlighted/underlined. Is there a doc on how to setup Visual Studio to work with tModLoader?

- Aerlock
 

Kazzymodus

Moderator
Staff member
Moderator

DerDrach

Terrarian
So I saw in bugfixes for v0.8 you had done some work on trying to fix the issue of NPCs disappearing on multiplayer servers. I was excited for this because me and my friends have been trying to get a server with mods on it for a while only to find modded enemies would disappear on hit each time. So I did some testing on my private server running the tremor mod and this is what I've found.
-Only Certain enemies are disappearing on hit (Undead Warriors from the tremor mod)
-Sometimes if there are multiple on screen if I hit one the other will disappear (I'm not sure if im imagining this one or not)
-The guide on the new world I've started still shoots at the invisible enemies as if they are still there and following me
-The guide can still be hit by the enemies if I lead them into
-After about 30 seconds the invisible mob sometimes reappears and stays visible
-After they reappear they seem to have taken damage from the guide
-I'm the only one on my server at the moment ( I have no one else to test with at the moment)
-A little off topic is enemies are sometimes teleporting around once they get close to me even though my server is ran off the same network which suggests some desyncronization which doesn't happen on my vanilla server
-I have none of these problems on vanilla so they should all be a result of using the mod
-these situations do not happen in single player
If There is any other testing you would like me to do I would be glad to help! I hope this is of some use!
 

Piterros990

Duke Fishron
How can I place tile 3x2, when I tried before only 1/3 tile was placed. I saw that I have to modify this:
Code:
TileObjectData.newTile.CoordinateHeights = new int[]{ 18 };
but I don't know how.
 
Top Bottom