Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Issue Using Mono.Cecil To Modify TModLoader #204
If you use another modification package (like RomTerraria/RTRewriter) to modify TModLoader 0.10.0.2, NGEN fails on the generated assembly.
Steps to Reproduce
Application should not crash.
The version of Mono.Cecil being used predates the version of the .NET Framework used for TModLoader's compilation. As a result, things don't work quite right.
If you guys want to embed what RTResolution does inside TModLoader, it's easy enough to do.
Inside your revised Terraria.Main::do_Draw(GameTime), there are two constants (1920f and 1200f). Replace both with 8192f.
Inside Terraria.Main::SetGraphicsProfileInternal(), replace each instance of the constant 4096 with the constant 8192.
Sounds like a runtime bogosity:
The runtime version used by Mono.Cecil shouldn't be a problem, as it doesn't need any runtime being present for the written assembly -- the work done by Cecil could've been done in native code just fine. It just happens to be written in C#.
OTOH, a stack trace could be useful, as
Another solution is to simply apply the changes in tModLoader itself.