• 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

tModLoader Official tModLoader Help Thread

Tyndareus

Terrarian
Are you talking about files within a packaged .tmod file, such as a json or txt file you as a modder can use? Or something that gets externally saved to Main.SavePath for the purpose of persistency? Both things are possible, the former is as easy as using the Mod.GetFileBytes method
Got another one for you, is it possible to get ALL files in a specific directory?
Similar to Directory.GetFiles, just to reduce named searches.
 

zilchii

Terrarian
Hello everyone, could one of y'all kind folk please help me with a problem I'm having installing Tmodloader 0.11.8.1 64 bit. (I have GoG)
I did everything as instructed and got this error:

3/9/2021 8:38:27 PM

System.DllNotFoundException: Unable to load DLL 'soft_oal.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

at Microsoft.Xna.Framework.SDL2_FNAPlatform.CreateALDevice()

at Microsoft.Xna.Framework.Audio.AudioDevice.Initialize()

at Microsoft.Xna.Framework.FrameworkDispatcher.Update()

at
Microsoft.Xna.Framework.Game..ctor()

at Terraria.Main..ctor()

at Terraria.Program.LaunchGame_()


Note: Tmodloader 32bit works just fine, aside from memory problems of course.
Please help.
 

Omnikannon

Terrarian
My god i have almost the exact same error
 

Attachments

  • 20210310_151856.jpg
    20210310_151856.jpg
    3.3 MB · Views: 47

zZixAxX

Terrarian
Sorry Im still learning how to code and I just cant figure out how to call the liquidType inside KillTile, if you can show me that would be great but no need to force yourself
 

direwolf420

Terrarian
Sorry Im still learning how to code and I just cant figure out how to call the liquidType inside KillTile, if you can show me that would be great but no need to force yourself
Tile tile = Main.tile[i, j];
tile.liquidType(Tile.Liquid_Water);
tile.liquid = 255;
 
I have a few questions/comments for tModLoader:

1) Since last year I have been using a modified version of tModLoader 0.11.7.5 that will allow it to run my legitimate GOG.com copy of Terraria 1.3.5.3 on Windows 7. This has worked fine for me without any problems at all. I need to upgrade to a newer version of tModLoader because some of the mods I use require a newer version of tModLoader in order to be compatible with the mod updates. I have tested tModLoader 0.11.8.2 and it is not working. Here are the following log outputs for the working 0.11.7.5 and the not working 0.11.8.2. Has there been some new dependency for tModLoader in the updates after 0.11.7.5 that is required? What happens when I try to start the newer version of tModLoader now is that no window opens for the game and I see it in the task manager, but it never starts the game. I have tried reinstalling the game, moving the tModLoader folder, nothing seems to work. 0.11.7.5 works fine but 0.11.8.2 won't start the game. Please assist :(

[16:27:46] [1/INFO] [tML]: Starting tModLoader v0.11.7.5 Windows client (2/27/2021)
[16:27:46] [1/INFO] [tML]: Running on NetFramework 4.7.2
[16:27:46] [1/INFO] [tML]: Executable: C:\Games\Terraria\tModLoader\tModLoader.exe
[16:27:46] [1/INFO] [tML]: Working Directory: C:\Games\Terraria\tModLoader
[16:27:46] [1/INFO] [tML]: Launch Parameters:
[16:27:46] [1/DEBUG] [tML]: Assembly Resolve: -> MonoMod.RuntimeDetour, Version=20.5.14.1, Culture=neutral, PublicKeyToken=null
[16:27:46] [1/DEBUG] [tML]: Assembly Resolve: MonoMod.RuntimeDetour, Version=20.5.14.1, Culture=neutral, PublicKeyToken=null -> MonoMod.Utils, Version=20.5.14.1, Culture=neutral, PublicKeyToken=null
[16:27:46] [1/DEBUG] [tML]: Assembly Resolve: MonoMod.RuntimeDetour, Version=20.5.14.1, Culture=neutral, PublicKeyToken=null -> Mono.Cecil, Version=0.11.2.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e
[16:27:46] [1/DEBUG] [tML]: Assembly Resolve: -> Ionic.Zip.Reduced, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c
[16:27:46] [1/DEBUG] [tML]: Assembly Resolve: -> Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
[16:27:46] [1/INFO] [tML]: Checking GOG or manual installation...
[16:27:46] [1/INFO] [tML]: GOG or manual installation OK.
[16:27:46] [1/DEBUG] [tML]: Assembly Resolve: -> Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null
[16:27:47] [1/DEBUG] [Terraria]: Graphics Device: Radeon (TM) RX 470 Graphics {Width:1920 Height:1080 Format:Color AspectRatio:1.777778}
[16:27:47] [1/DEBUG] [Terraria]: Device Reset, Profile: Reach -> HiDef, Width: 800, Height: 480, Fullscreen: False, Display: \\.\DISPLAY1
[16:27:48] [1/INFO] [Terraria]: Loaded 1000 vanilla assets
[16:27:48] [1/INFO] [Terraria]: Loaded 2000 vanilla assets
[16:27:48] [1/INFO] [Terraria]: Loaded 3000 vanilla assets
[16:27:48] [1/INFO] [Terraria]: Loaded 4000 vanilla assets
[16:27:48] [1/INFO] [Terraria]: Loaded 5000 vanilla assets
[16:27:49] [1/DEBUG] [Terraria]: Device Reset, Profile: HiDef, Width: 800 -> 1280, Height: 480 -> 720, Fullscreen: False -> True, Display: \\.\DISPLAY1
[16:27:50] [1/DEBUG] [Terraria]: Device Reset, Profile: HiDef, Width: 1280 -> 1920, Height: 720 -> 1080, Fullscreen: True, Display: \\.\DISPLAY1
[16:27:50] [6/WARN] [tML]: Silently Caught Exception:
System.EntryPointNotFoundException: Unable to find an entry point named 'EventSetInformation' in DLL 'advapi32.dll'.
at Microsoft.Win32.UnsafeNativeMethods.ManifestEtw.EventSetInformation(Int64 registrationHandle, EVENT_INFO_CLASS informationClass, Void* eventInformation, Int32 informationLength)
at System.Diagnostics.Tracing.EventProvider.SetInformation(EVENT_INFO_CLASS eventInfoClass, Void* data, Int32 dataSize)
at System.Diagnostics.Tracing.EventSource.Initialize(Guid eventSourceGuid, String eventSourceName, String[] traits)
at System.Diagnostics.Tracing.EventSource..ctor(EventSourceSettings settings, String[] traits)
at System.Linq.Parallel.PlinqEtwProvider..cctor()
at System.Linq.Parallel.QuerySettings.WithPerExecutionSettings(CancellationTokenSource topLevelCancellationTokenSource, Shared`1 topLevelDisposedFlag)
at System.Linq.Parallel.ForAllOperator`1.RunSynchronously()
at System.Linq.ParallelEnumerable.ForAll[TSource](ParallelQuery`1 source, Action`1 action)
at Terraria.Program.ForceJITOnAssembly(IEnumerable`1 types)
at Terraria.Program.ForceLoadAssembly(Assembly assembly, Boolean initializeStaticMembers)
at Terraria.Program.ForceLoadThread(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()

[16:27:52] [8/DEBUG] [tML]: Assembly Resolve: -> MP3Sharp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
[16:27:52] [8/DEBUG] [tML]: Assembly Resolve: -> NVorbis, Version=0.8.4.0, Culture=neutral, PublicKeyToken=null
[16:27:52] [8/DEBUG] [tML]: Assembly Resolve: -> Mono.Cecil.Mdb, Version=0.11.2.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e
[16:27:52] [8/DEBUG] [tML]: Assembly Resolve: -> Mono.Cecil.Pdb, Version=0.11.2.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e
[16:27:52] [6/INFO] [Terraria]: JIT loading finished
[16:27:54] [10/INFO] [tML]: Unloading mods
[16:27:55] [10/INFO] [tML]: Finding Mods...
[16:27:55] [10/INFO] [tML]: Sandboxing: ItemChecklist
[16:27:55] [10/INFO] [tML]: Sandboxing: SpiritMod
[16:27:55] [10/INFO] [tML]: Instantiating Mods...
[16:27:56] [10/INFO] [tML]: Initializing: ModLoader v0.11.7.5
[16:27:56] [10/INFO] [tML]: Initializing: ItemChecklist v0.5.2
[16:27:56] [10/INFO] [tML]: Initializing: SpiritMod v1.4.0.4
[16:27:58] [10/DEBUG] [tML]: Assembly Resolve: SpiritMod_0, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null -> TerrariaHooks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
[16:27:58] [10/DEBUG] [tML]: Assembly Resolve: TerrariaHooks, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null -> MonoMod.RuntimeDetour, Version=19.12.19.1, Culture=neutral, PublicKeyToken=null
[16:27:58] [10/WARN] [tML]: Upgraded Reference MonoMod.RuntimeDetour -> Version=19.12.19.1 -> 20.5.14.1
[16:27:58] [10/DEBUG] [tML]: Hook On.Terraria.Main::DrawProjectiles() added by SpiritMod_0
[16:27:58] [10/DEBUG] [tML]: Hook On.Terraria.Projectile::NewProjectile(float, float, float, float, int, int, float, int, float, float) added by SpiritMod_0
[16:27:58] [10/DEBUG] [tML]: Hook On.Terraria.Player::KeyDoubleTap(int) added by SpiritMod_0
[16:27:58] [10/DEBUG] [tML]: Hook On.Terraria.Main::DrawDust() added by SpiritMod_0
[16:27:58] [10/INFO] [tML]: Setting up...
[16:27:58] [10/INFO] [tML]: Loading: ModLoader v0.11.7.5
[16:27:58] [10/INFO] [tML]: Loading: ItemChecklist v0.5.2
[16:27:59] [10/INFO] [tML]: Loading: SpiritMod v1.4.0.4
[16:27:59] [10/INFO] [tML]: Adding Recipes...

[20:04:08] [1/INFO] [tML]: Starting tModLoader v0.11.8.2 Windows client (3/30/2021)
[20:04:08] [1/INFO] [tML]: Running on NetFramework 4.7.2
[20:04:08] [1/INFO] [tML]: Executable: C:\Games\Terraria\tModLoader\tModLoader.exe
[20:04:08] [1/INFO] [tML]: Working Directory: C:\Games\Terraria\tModLoader
[20:04:08] [1/INFO] [tML]: Launch Parameters:
[20:04:08] [1/DEBUG] [tML]: Assembly Resolve: -> MonoMod.RuntimeDetour, Version=20.11.16.1, Culture=neutral, PublicKeyToken=null
[20:04:08] [1/DEBUG] [tML]: Assembly Resolve: MonoMod.RuntimeDetour, Version=20.11.16.1, Culture=neutral, PublicKeyToken=null -> MonoMod.Utils, Version=20.11.16.1, Culture=neutral, PublicKeyToken=null
[20:04:08] [1/DEBUG] [tML]: Assembly Resolve: MonoMod.RuntimeDetour, Version=20.11.16.1, Culture=neutral, PublicKeyToken=null -> Mono.Cecil, Version=0.11.3.0, Culture=neutral, PublicKeyToken=50cebf1cceb9d05e
[20:04:09] [1/DEBUG] [tML]: Assembly Resolve: -> Ionic.Zip.Reduced, Version=1.9.1.8, Culture=neutral, PublicKeyToken=edbe51ad942a3f5c
[20:04:09] [1/DEBUG] [tML]: Assembly Resolve: -> Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed
[20:04:09] [1/INFO] [tML]: Checking GOG or manual installation...
[20:04:09] [1/INFO] [tML]: GOG or manual installation OK.
[20:04:09] [1/DEBUG] [tML]: Assembly Resolve: -> Steamworks.NET, Version=9.1.0.0, Culture=neutral, PublicKeyToken=null
[20:04:10] [1/DEBUG] [Terraria]: Graphics Device: Radeon (TM) RX 470 Graphics {Width:1920 Height:1080 Format:Color AspectRatio:1.777778}
[20:04:10] [1/DEBUG] [Terraria]: Device Reset, Profile: Reach -> HiDef, Width: 800, Height: 480, Fullscreen: False, Display: \\.\DISPLAY1

2) I enjoy 1.3.5.3 and have personal preferences regarding the since changes to the game that I would like to continue using this version of the game alongside tModLoader instead of changing to 1.4 in the future. Will tModLoader continue to work with 1.3.5.3 after the 1.4 version finally arrives? I try to keep strict archives of my game versions and mods so if there is some legitimate technical reason why mods shouldn't be able to work with 1.3.5.3 after tModLoader 1.4 comes out, I suppose I will have to just stick with those versions of the mods. Unless there is some way to keep using Terraria 1.3.5.3, which would be preferable :)

3) Frankly speaking, putting DRM into a mod is incredibly hostile to legitimate users and for those without the technical skills to remove it, I feel quite bad for them, such as other GOG owners like me. tModLoader has NEVER worked for my legitimately owned copy of Terraria without the necessary hack to remove the unnecessary DRM. It would be something that would be very appreciated to have officially removed in future versions of tModLoader. DRM is the most anti-user piece of technology that has ever existed and only serves to hurt legitimate users. Food for thought.

DRM.png
 
Hey all, I'm making a town NPC and I have some animation bugs. I adapted animations of my NPC to the guide's animations but something weird happens when the NPC is walking or doing emotes.

Video
animation frames:
I don't have alt textures, maybe that causes the problem?
 

Solo-Ion

Dungeon Spirit
Hey all, I'm making a town NPC and I have some animation bugs. I adapted animations of my NPC to the guide's animations but something weird happens when the NPC is walking or doing emotes.

Video
animation frames:
I don't have alt textures, maybe that causes the problem?
It's hard to say exactly what's gone wrong, but it looks like the number of animation frames in the .cs file doesn't match the actual number of frames in the .png file.

What do you have in Main.npcFrameCount[npc.type] = ??; and how many are in the image?

Edit: huh, the image didn't load until after I replied. I can see that you have 27 frames. What does it say in the .cs file?

Edit 2: I've had a closer look at your image, and it looks like you've duplicated the last frame of his walk. Removing that frame may work, as long as you also set Main.npcFrameCount[npc.type] to 26.
 
Last edited:
It's hard to say exactly what's gone wrong, but it looks like the number of animation frames in the .cs file doesn't match the actual number of frames in the .png file.

What do you have in Main.npcFrameCount[npc.type] = ??; and how many are in the image?

Edit: huh, the image didn't load until after I replied. I can see that you have 27 frames. What does it say in the .cs file?

Edit 2: I've had a closer look at your image, and it looks like you've duplicated the last frame of his walk. Removing that frame may work, as long as you also set Main.npcFrameCount[npc.type] to 26.
I'm new to modding, here is my code hastebin

I'll try what you said and add the result to this post
 

Solo-Ion

Dungeon Spirit
I'm new to modding, here is my code hastebin

I'll try what you said and add the result to this post
Yeah, you've got 26 as your number of frames, when your image has 27. I can also see that for ExtraFramesCount you have 9. I haven't played around with that number on NPCs, but I think that that is the number of frames after the walk cycle, and both the Guide and your image has 10. You could try changing that if you still have issues after removing that frame.
 
Yeah, you've got 26 as your number of frames, when your image has 27. I can also see that for ExtraFramesCount you have 9. I haven't played around with that number on NPCs, but I think that that is the number of frames after the walk cycle, and both the Guide and your image has 10. You could try changing that if you still have issues after removing that frame.
I think it fully fixed it, it still has some problems but I think it has something to do with my drawing. I probably drew some of the frames bigger than others. Also, I accidentally drew the whole thing smaller than it should (my image was 24x900, and I think it should be 40x1456) so I just amplified it in photoshop. That's why it looks blurry lol. I'll try to fix my drawing. Thank you so much

video:
 
Top Bottom