November 7, 2013

RomTerraria 3 Preview Release Here

[Update 6/30/2015 7:09pm] Updated v4 version here for use with Steam and GOG 1.3.x and above.

I've released RomTerraria 3 as a preview release.  This release should ONLY be used by people who want to play at resolutions greater than 2048 in either direction (up to 8192).

Features in this release:

- RomTerraria generates a new executable in your <My Documents>/My Games/Terraria named Terraria.Rewritten.exe.  This executable is custom created based on the settings you select.
- RomTerraria's settings file is saved to <My Documents>/My Games/Terraria/config.rt so it won't impact your settings from stock Terraria.
- Force XNA into HiDef profile instead of Reach so that it will take advantage of Shader Model 3.0 spritebatches.
- Eliminates the depth buffer on render targets, reducing video card memory usage by half.
- Enhanced lighting (and its accompanying performance increases) will work at resolutions over 1920x1080 (up to 8192x8192). I found a workaround for XNA's RenderTarget2D size limitations.


Possible issues:

- If your system doesn't meet the HiDef profile, you'll fail miserably.
- May not work on the Collector's Edition.

[Update 1/19/2015 9:10p] Starting to add back in single player functions, like "Always Daylight" and "Spawn NPCs Fast."
v0.99.1 (deprecated) download here.

Unzip this to someplace OTHER than your Terraria install folder. 

Screenshots




Note: If you encounter any crashes, hit Ctrl-C in the dialog that pops up with the stack trace, and paste the stack trace into a reply to this post.

Note #2: I can't accept donations or any sort of financial compensation for RomTerraria. If you want to show some support for RomTerraria, please donate to support survivors of Typhoon Haiyan.

Note #3: If you are getting an error that says "Unable to find Terraria," make sure Steam is running.  If it still can't find Terraria, uninstall and reinstall the game.  I rely on metadata that Steam provides to find Terraria in alternate install locations.  If it still can't find the game, add me as a friend on Steam and I'll see what I can find.

[Update 11/12 7:35p] v0.96 released.  No bug fixes, but pops up a prompt if you drop RomTerraria 3 in the same folder as Terraria to prevent an error.

[Update 11/13 10:56a] Added donation link for survivors of Typhoon Haiyan, cleaned up the page.

[Update 11/29 4:15p] v0.97 released.  Additional code for people who are having problems patching.

[Update 12/19 10:27p] This works with no modification on the new v1.2.2 release.  If you had previously patched v1.2.1, just rerun the patcher and it will update Terraria.Rewritten.exe for you.

[Update 2/19/2014 10:12p] This works with no modification on the new v1.2.3.1 release.  If you had previously patched v1.2.1, just rerun the patcher and it will update Terraria.Rewritten.exe for you.

[Update 1/18/2015 11:45a] This version now works with the GOG.com version and puts no files in the Terraria folder.

[Update 1/19/2015 9:10p] This version is starting to add in single player hooks.

[Update 2/3/2015] Cleaning up some ancient comments so relevant topics bubble up.

39 comments:

pantsonnos said...

v.095 works great! Running at 5934x1080 (Bezel correction).
Looking forward to what you can do in the future :)

brad.meredith said...

I'm getting a crash. It actually started earlier today on RomTerraria 2.0.4421.13566, so I tried the version 3 preview release, and I'm still getting it. Everything works fine unless I try to use multi-monitors at the same time as multiplayer. Then I get this:

---------------------------
RomTerraria 2.0.4421.13566
---------------------------
[System.IndexOutOfRangeException] Index was outside the bounds of the array.

at Terraria.Main.lookForColorTiles()

at Terraria.Main.Draw(GameTime gameTime)

at RomTerraria.GameLauncher.Draw(GameTime gameTime)

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

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

at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)

at Microsoft.Xna.Framework.GameHost.OnIdle()

at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()

at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)

at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)

at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)

at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)

at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)

at System.Windows.Forms.Application.Run(Form mainForm)

at Microsoft.Xna.Framework.WindowsGameHost.Run()

at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)

at RomTerraria.Program.Main()


---------------------------
OK
---------------------------

brad.meredith said...

After doing a little more poking around, it seems this is only related to a particular character.

Michael Russell said...

brad.merideth,

Thanks for the bug report. Even though it may be character specific, I'll look into it tonight when I get home from work.

Michael Russell said...

brad.merideth,

I did some investigation and I think that this could be triggered even in stock Terraria.

If your character started in a larger world and moved far right or down, then loaded a smaller world, you could potentially end up with that sort of crash.

brad.meredith said...

OK, Michael, thanks for looking into it!

I switched video settings to single-screen, moved my character back to the default spawn point, and then logged out and changed back to multi-monitor. All fixed!

Thank you!

Matthew Carter said...

Mine came up with a terraria-like error box, and generated a client-crashlog.txt file, which I've copied here:

29 November 2013 11:06:29 Afternoon
System.NullReferenceException: Object reference not set to an instance of an object.
at RTHooks.ScreenHelpers.ClearBooleanArray(Object terrariaMain, Type gameType, String fieldName)
at RTHooks.ScreenHelpers.ClearAllContent(Object terrariaMain)
at RTHooks.ScreenHelpers.Main_InitTargets(Object terrariaMain)
at Terraria.Main.InitTargets()
at Terraria.Main.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.DrawFrame()
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Terraria.Program.Main(String[] args)

Any Ideas?

Michael Russell said...

Matthew,

Thanks for the report. I'll be home in a couple of hours and will investigate, but I'm suspecting that either you have an older version of Terraria or an update was released I wasn't aware of.

Can you please validate your game cache, repatch, and let me know if it is still happening?

Michael Russell said...

Matthew,

I released a new version (0.97). If it doesn't fix your problems, it will at least tell us why it isn't working for you.

Gabessdsp3 said...

So I am getting the following error message:
12/4/2013 10:31:08 AM
System.IO.DirectoryNotFoundException: Could not find a part of the path 'E:\Documents\My Games\Terraria\Players'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
at System.IO.Directory.CreateDirectory(String path)
at Terraria.Main.LoadPlayers()
at Terraria.Main.DrawMenu()
at Terraria.Main.Draw(GameTime gameTime)
at Microsoft.Xna.Framework.Game.DrawFrame()
at Microsoft.Xna.Framework.Game.Tick()
at Microsoft.Xna.Framework.Game.HostIdle(Object sender, EventArgs e)
at Microsoft.Xna.Framework.GameHost.OnIdle()
at Microsoft.Xna.Framework.WindowsGameHost.RunOneFrame()
at Microsoft.Xna.Framework.WindowsGameHost.ApplicationIdle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Microsoft.Xna.Framework.WindowsGameHost.Run()
at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun)
at Terraria.Program.Main(String[] args)
/n

Michael Russell said...

Gabessdsp3,

This issues used to happen a lot with Terraria 1.1, but I thought it had been fixed.

Try creating the folder "E:\Documents\My Games\Terraria\Players" for now, and when I get back from Boston this weekend, I'll try to create a more permanent fix.

Ash Mcwhirter said...

I dont know how to install?

SN said...

Apologies if this is a duplicate; Google seems to have eaten my comment when I tried to post before logging in.

First, let me start by saying thanks for creating this awesome utility on your own free time. I'm sure I am not the only one to have benefited greatly.

Additionally, the issue I ran into is definitely a corner case and may not be worth addressing. If you don't fix this, I totally understand.

I have a setup with an SSD containing Steam and Windows, while Terraria is installed on a hard drive. In Steam, I have 2 library folders defined. When Terraria is installed on the alternate library on the hard drive (which isn't the drive where the Steam application is installed), RomTerraria can't find Terraria.

Let me know if you need any other information, and once again, thanks for creating this wonderful utility.

Michael Russell said...

SN,

Make sure you are running the latest version of RomTerraria. I pull the path to Terraria from Steam's config.vdf file.

I'm specifically pulling the path from the key InstallConfigStore/Software/Valve/Steam/apps/105600/installdir.

Sam said...

Help! I keep getting this message: http://i.imgur.com/sAUNimB.png

Michael Russell said...

Sam,

Upgrade to RomTerraria 3 using the upgrade link above. ReLogic changed Terraria's internals fairly dramatically, hence the complete rewrite.

Garrett Blundon said...

Hi There,

This program is great! used it on win7 and 8.1 no problem but after upgrading to 10 tech preview i get this error as soon as i open the program and try to hit "update terraria":

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at RTRewriter.frmMain.btnOpenFolder_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
RTRewriter
Assembly Version: 0.99.1.0
Win32 Version: 0.99.1.0
CodeBase: file:///C:/Users/Garrett/Desktop/RT3-0.99.1/RTRewriter.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.5.27.0 built by: FX453PREVIEWREL
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:





When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Michael Russell said...

Garrett,

I've got Windows 10 Technical Preview installed on a couple of machines here, and at least at the moment, it's too unstable for me to support.

Sorry.

Kieran Goddard said...

how do i install the mod cause im using gamiki mod installer and it won't work D:

Michael Russell said...

Kieran,

Unsure. At work right now. Will check into it when I get home.

Lellson W. said...

Can't start Terraria.rewritten :/
I also don't get a message when i start it. Just nothing... :(

Michael Russell said...

Lellson W.,

Are you using the Steam version or the GoG version of Terraria, and which version number of Terraria are you running?

Chewy Fudge said...

I´m running the GOG version, and i´m getting the "unable to find terraria" error. I´ve tried reinstalling and i've ran it at least once...

Michael Russell said...

Chewy,

Can you please tell me what registry key values you have at:

"HKEY_LOCAL_MACHINE\SOFTWARE\re-logic\terraria"

Chewy Fudge said...

I haven't got the "re-logic" folder in my regdb. At that position...

Michael Russell said...

Chewy,

Looks like there might be different versions of the GOG installer.

Let me find another registry key to use as a backup.

frank meijer said...

The problem I have is that I have my steam library on my D drive, instead of the C drive that the program is looking for. Is there a workaround for this?

My D drive is a HDD, and my C drive is an SSD. I try to avoind installing too many games on my ssd.

Michael Russell said...

Frank,

The patcher asks Steam where it is installed.

frank meijer said...

Michael, I do not know why it gave me the error before. It is working now.

Thank you for this tool.

Dakota Talon said...

Any chance of getting a GUI scaler added to this? I'm loving 1440p, but damn is it hard to see anything in the inventory at that size. Like, 150% gui size would be awesome.

Chrono Kiriame said...

Help! I installed RomTerraria, everything ran smoothly, but when I got into the game, it only gave me the default resolution options. :(

Michael Russell said...

Chrono,

Did you run Terraria.exe or Terraria.Rewritten.exe?

Ethan Reesor said...

v0.99.1 works in full screen, but in windowed mode, the window border doesn't render, so I can't resize it...

Michael Russell said...

Ethan,

Sounds like you've turned on Cooperative Fullscreen, which is needed for some multimonitor setups.

Insider Network said...

when I run Terraria.Rewritten.exe, I cant change the resolute any higher than my monitor size, please help.

Michael Russell said...

Insider,

The cap is either 8192 pixels in any one direction, or the highest virtual desktop size. If you are using multiple monitors, turn on cooperative fullscreen.

Michel Comeau said...

Has anything been done for latest release (1.3.0.4), when i try your tool, it crashes with the following error message:

System.Collections.Generic.KeyNotFoundException: Method 'System.Void Terraria.Steam::Kill()' not found.
at RTRewriter.Cecil.CecilHelpers.FindMethodInAssembly(AssemblyDefinition assembly, String methodName)
at RTRewriter.Cecil.CecilHelpers.TurnMethodToNoOp(AssemblyDefinition assembly, String methodName)
at RTRewriter.Cecil.Rewriter.CondenseSteam()
at RTRewriter.frmMain.btnUpdate_Click(Object sender, EventArgs e)

Michael Russell said...

Michel,

Versions for Terraria 1.3.x are here:
http://romsteady.blogspot.com/2015/06/romterraria-4-released.html

Michel Comeau said...

Thank you very much :)