Your example is unnecessarily complex. Yes, you will be able to get any property you add to your config. (What's the point of it if you couldn't?) ExampleMod.MyConfig.MyProperty Example config: https://paste.mod.gg/oqujujiwiq.cs
How do you make a block get placed facing the player, without using "TileObjectData" because the game wants to divide by 0
the most unstable thing I have ever seen, but still; its amazing. Its the reason I have like 200 hours THIS MONTH on terraria
Is there a tutorial/guide for custom multiplayer synchronization? When I try to compile a mod that I'm working on, tModLoader says "...\RegenFromBosses_NetSynch.cs(21,21) : error CS0120: An object reference is required for the non-static field, method, or property 'Mod.GetPacket(int)' ", however when I compile ExampleMod (which also has custom synchronization), no such error occurs, which means that the error is on my part somehow. This is the current RegenFromBosses_NetSynch.cs file, minus two methods to keep the post shorter: RegenFromBosses_NetSynch.cs Code: using System.IO; using System.Linq; //For C#6 compiling using Terraria; using Terraria.ID; using Terraria.ModLoader; using Terraria.ModLoader.IO; //This file is all about synchronizing the regenLife variable in multiplayer //It has a function that sends regenLife from the server to all clients (NetSendRegen()), //and a function that lets clients ask the server to do the above (NetGetRegen()) //Note that despite what this file is for, this mod's multiplayer synchronization compatibility is still completely unknown at the time namespace RegenFromBosses { public partial class RegenFromBosses : Mod { public static void NetSendRegen() //Send the current life regeneration value from the server to all clients { if (Main.netMode==NetmodeID.Server) //If hosting the server... { /*ERROR*/ ModPacket packet=GetPacket(); //...create a new network packet... packet.Write((byte)PacketType.ServerSendRegenToClient); //...write what the packet is for... packet.Write(regenLife); //...write the current life regeneration value... packet.Send(); //...and send the packet } } //public static void NetGetRegen() { ... } //Ask the server to transmit the current life regeneration value //public override void HandlePacket(BinaryReader reader,int whoAmI) { ... } //Do stuff with network packets } enum PacketType : byte //Multiplayer synchronization network packet types { ServerSendRegenToClient, //Used when the server sends the current life regeneration value to a client ClientRequestRegenFromServer //Used when a client requests the current life regeneration value from the server } } Again, ExampleMod doesn't have this issue. Even if I actually copy some similar synchronization code that works in ExampleMod (or other open-source tModLoader mods) and paste it in this place, along with all of the "using" directives, it still errors when compiling. What annoys me and made me make this post isn't that I get an error, but that I get an error when doing the exact same thing as something else that does not get an error.
if you are using calamity + overhaul they lately dont go well in world creation, if you want to create a world with calamity remove overhaul for the world creation and add it later, also i think spirit mod is having some incompatibilities too worldgen previewer also crashes with calamity world gen, and since calamity makes worlds a little bigger i recomend using large world enabler to remove some issues like hell side of map being distorted
Hiya, I've downloaded the Windows version but the application in my files is called 'tModLoaderMac' and wont run on my PC. When I troubleshoot it says its an incompatible version. So how do I get the Windows version?
tModLoaderMac is a file in the ModCompile folder within the downloaded zip file. You don't run that file, you run Terraria.exe from the zip. Read the readme.txt.
in the new version i have 2 problems with 2 mods ,the thorium and calamity with this mods when i select a character the terraria just crash ,and i cant play alone ,anyone can help me pls?
Is it possible to override Terraria.Main.checkHalloween() and Terraria.Main.checkXMas()? (If not, I'd like to request that to be possible.) I can't find them in the "patch" things of tModLoader's GitHub page, and I'm trying to make a mod which's sole purpose is to do stuff in those methods (while that mod currently says that those methods can't be overriden). Edit: Or perhaps instead of an overrideable checkHalloween() and checkXMas(), maybe some kind of new tModLoader-specific checkDate() that runs when checkHalloween() and checkXMas() usually would, or something specifically for when night passes to day naturally (and vice-versa)? Either thing would be helpful for this mod in any case.
Just out of curiosity, the ultimate apocalypse guys claim to have a 64bit Tmodloader. Does any one here know if it's possible? Since terraria it self is 32 bit and all.
Hola, tengo un problema con el Terraria, el Terraria funciona correctamente pero cuando extraigo los archivos de Modloader v0.10.1.5 me sale este error Ayuda
Does tModLoader crash on exit for anyone else? Sorry if it's been reported already. Quite a few posts to go through. Here's my crash log. It even happens with no mods enabled. Spoiler Silently Caught Exception: Object reference not set to an instance of an object. at Terraria.ModLoader.IO.ItemIO.Save(Item item) at Terraria.ModLoader.ModCompile.<>c.<ActivateExceptionReporting>b__15_0(Object sender, FirstChanceExceptionEventArgs exceptionArgs) at Terraria.ModLoader.IO.ItemIO.Save(Item item) at Terraria.ModLoader.IO.PlayerIO.SaveInventory(Item[] inv) at Terraria.ModLoader.IO.WorldIO.SaveChests() at Terraria.ModLoader.IO.WorldIO.Save(String path, Boolean isCloudSave) at Terraria.IO.WorldFile.saveWorld(Boolean useCloudSaving, Boolean resetTime) at Terraria.WorldGen.saveAndPlayCallBack(Object threadContext) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() It also crashes at random. No cause in particular. I should specify that this is a custom TerraCustom world I imported from Vanilla into tModLoader. I'll bet that would make a difference.