• Labor of Love: Our plan is to release the update on PC at 10 am EST on September 28th. We’ll push all other approved platforms live at that time, keep in mind, those systems are more complex, so actual time it arrives on your device could vary - you’ll want to keep an eye out!

Standalone [1.3] tModLoader - A Modding API

Still trying to build ExampleMod on OSX.

ExampleMod references Microsoft.Xna.Framework, so apparently I need a Windows.dll and a Mono.dll. However, I do not know how to make these files. Are they just reference files to go alongside the ExampleMod.dll, or something different?

I'll keep experimenting in the meantime.

Oh yeah, and one more thing: Windows.dll is supposed to reference a Windows Terraria.exe. Does this mean I cannot use the Terraria.exe that comes with the OSX version?
 

LaMustii

Terrarian
i thing i have a Problem, if i start the game in fullscreen, comes blackscreen but i hear the sound for a moment.
and so it remains all the time
 

Salamander King

Terrarian
Hey when i try to download a mode it says that "the servers are under heavy load right now, try again later". Is there any way i can fix this or do I just have to wait?
 
In the meantime, you can download mods directly from their mod pages. Some don't have direct downloads available, so feel free to ask about it if that's not currently an option.

Also, progress: I managed to get a hold of a Windows laptop, so now I am grabbing the Terraria source and the Windows Terraria.exe. Yay!
 
The javid.ddns.net page isn’t working
I didn't mean the javid.ddns.net page (that's where the mod browser gets its links - of course that doesn't work either).
I meant the actual mod homepages here on the Terraria forums.

A question: Is it currently possible to create a mod which causes cross-mod interactions? For example, a mod which adds boss summons to the Fargo's Mod Mutant NPC shop, or a mod which changes other mod's boomerang-style weapons to contain the right-click damage type change introduced in Zoaklen's.
 

jopojelly

Retinazer
tModLoader
Still trying to build ExampleMod on OSX.

ExampleMod references Microsoft.Xna.Framework, so apparently I need a Windows.dll and a Mono.dll. However, I do not know how to make these files. Are they just reference files to go alongside the ExampleMod.dll, or something different?

I'll keep experimenting in the meantime.

Oh yeah, and one more thing: Windows.dll is supposed to reference a Windows Terraria.exe. Does this mean I cannot use the Terraria.exe that comes with the OSX version?
Your ide will build the windows.dll and the mono.dllfrom your cs files (you'll rename the dll built by the compiler). you'll use one solution configuration fire one, another for the other. Make sure your project is set to build dll.

I'm pretty sure the Mac download has TerrariaWindows.exe in its modcompile folder, which you will reference for the configuration that makes the windows.dll.

The project file might just be easier as two separate projects if you don't want to mess around with conditional references
 
Your ide will build the windows.dll and the mono.dllfrom your cs files (you'll rename the dll built by the compiler). you'll use one solution configuration fire one, another for the other. Make sure your project is set to build dll.

I'm pretty sure the Mac download has TerrariaWindows.exe in its modcompile folder, which you will reference for the configuration that makes the windows.dll.

The project file might just be easier as two separate projects if you don't want to mess around with conditional references
So what I need to do is set up two configurations:
One, called Windows, references XNA and tModLoaderWindows.exe (or vanilla Terraria.exe from windows version)
The other, called Mono, references FNA and tModLoaderMac.exe (or vanilla Terraria.exe from mac version)

Is this what I need to do?
 

jopojelly

Retinazer
tModLoader
So what I need to do is set up two configurations:
One, called Windows, references XNA and tModLoaderWindows.exe (or vanilla Terraria.exe from windows version)
The other, called Mono, references FNA and tModLoaderMac.exe (or vanilla Terraria.exe from mac version)

Is this what I need to do?
Yes.
 
OK, I did that. Now I'm getting this error when trying to compile the mod in-game:
Code:
Error running mcs: Cannot find the specified file
  at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0
  at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0
  at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.ModCompile.CompileMod (Terraria.ModLoader.BuildingMod mod, System.Collections.Generic.List`1 refMods, Boolean forWindows, System.Byte[]& dll, System.Byte[]& pdb) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.ModCompile.Build (Terraria.ModLoader.BuildingMod mod, IBuildStatus status) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.ModCompile.Build (System.String modFolder, IBuildStatus status) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.ModLoader+<>c.<BuildMod>b__41_0 (System.Object _) [0x00000] in <filename unknown>:0
Do you know what this means? (not a rhetorical question :p)
 

jopojelly

Retinazer
tModLoader
OK, I did that. Now I'm getting this error when trying to compile the mod in-game:
Code:
Error running mcs: Cannot find the specified file
  at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0
  at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0
  at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.ModCompile.CompileMod (Terraria.ModLoader.BuildingMod mod, System.Collections.Generic.List`1 refMods, Boolean forWindows, System.Byte[]& dll, System.Byte[]& pdb) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.ModCompile.Build (Terraria.ModLoader.BuildingMod mod, IBuildStatus status) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.ModCompile.Build (System.String modFolder, IBuildStatus status) [0x00000] in <filename unknown>:0
  at Terraria.ModLoader.ModLoader+<>c.<BuildMod>b__41_0 (System.Object _) [0x00000] in <filename unknown>:0
Do you know what this means? (not a rhetorical question :p)
Did you set the build.txt to have that nocompile flag?
 
Did you set the build.txt to have that nocompile flag?
Oh, darn! I could've sworn I had! Retrying :p

EDIT: Now it's complaining that I don't even have the files. Is there somewhere special they should be? Currently, they're located in bin/Release, though I've tried just bin/ and there's another copy of the files in bin/Debug as well.
EDIT2: Figured out the files need to be in the ExampleMod root directory. Unfortunately, it seems that the files are assembly name sensitive, so I have to rebuild them (I had changed the name in an attempt to sidestep renaming the .dll files).
 
Last edited:
Top Bottom