signaturebeef / open-terraria-api Goto Github PK
View Code? Open in Web Editor NEWOpen Terraria API - Mac, Linux & Windows
License: GNU General Public License v3.0
Open Terraria API - Mac, Linux & Windows
License: GNU General Public License v3.0
This allows us to hook and modify text sent to the client, for example.
Describe the bug
OTAPIv3 client fails to launch due to libwinpthread-1.dll
being missing.
To Reproduce
Expected behavior
The game launches without issues.
Stack trace
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.DllNotFoundException: Unable to load DLL '.\x64\FNA3D.dll' or one of its dependencies: The specified module couldn't be resolved. (0x8007007E) at System.Runtime.InteropServices.NativeLibrary.LoadFromPath(String libraryName, Boolean throwOnError) at System.Runtime.InteropServices.NativeLibrary.Load(String libraryPath) at OTAPI.Client.Launcher.Actions.OTAPI.ResolveNativeDep(String libraryName, Assembly assembly, Nullable`1 searchPath) in D:\a\Open-Terraria-API\Open-Terraria-API\OTAPI.Client.Launcher\Actions\OTAPI.cs:line 190 at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags) at Microsoft.Xna.Framework.SDL2_FNAPlatform.CreateWindow() in D:\a\Open-Terraria-API\Open-Terraria-API\FNA\src\FNAPlatform\SDL2_FNAPlatform.cs:line 284 at Microsoft.Xna.Framework.Game..ctor() in D:\a\Open-Terraria-API\Open-Terraria-API\FNA\src\Game.cs:line 274 at Terraria.Main..ctor() at HostGame..ctor() in csharp\plugins\modules\otapi-runtime\HostGame.cs:line 37 at HostGamePlugin.<>c.<PatchClient>b__3_0() in csharp\plugins\modules\otapi-runtime\HostGamePlugin.cs:line 64 at OTAPI.Hooks.Main.InvokeCreate() in patchtime\csharp\plugins\toplevel\otapi\HookMainCtor.Client.cs:line 60 at Terraria.Program.orig_LaunchGame(String[] args, Boolean monoArgs) at Terraria.Program.LaunchGame(String[] args, Boolean monoArgs) in patchtime\csharp\plugins\patches\otapi\Terraria.Program.Both.cs:line 139 at Terraria.WindowsLaunch.Main(String[] args) --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at OTAPI.Client.Launcher.Actions.OTAPI.Launch(String[] args) in D:\a\Open-Terraria-API\Open-Terraria-API\OTAPI.Client.Launcher\Actions\OTAPI.cs:line 56 at OTAPI.Client.Launcher.Program.Main(String[] args) in D:\a\Open-Terraria-API\Open-Terraria-API\OTAPI.Client.Launcher\Program.cs:line 66
Platform and patch info (please complete the following information):
57114e0
Additional context
I looked up what happened using ProcMon, and it seems that it is looking for libwinpthread-1.dll
. Maybe my system is outdated and the DLL is part of all newer system versions? I don't know.
For now I installed mingw-w64, and copied the DLL to OTAPI's folder, and it works. Kind of "resolved", but I think it'd be better if OTAPI could fetch all the libraries it needs so the user doesn't have to go hunt DLLs on their own.
Describe the bug
A segfault occurs
To Reproduce
/home/james/.steam/steam/steamapps/common/Terraria/
csharp/plugins/modules/otapi-runtime/HostGamePlugin.cs
(required due to #38)Expected behavior
The game to launch, modded with OTAPI
Stack trace
No stack trace available, this is a segfault. GDB provides no relevant output, but if you think it does I can provide it. i lied
output before segfault
GDB backtrace:
0x00007ffff7b7da0e in __strcmp_avx2 () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff7b7da0e in __strcmp_avx2 () at /usr/lib/libc.so.6
#1 0x00007ffff4bc157d in OPENGL_PrepareWindowAttributes () at /home/james/otapi/bin/Release/net5.0/ubuntu.16.04-x64/publish/lib64/libFNA3D.so.0
#2 0x00007ffff4bbf4d1 in FNA3D_PrepareWindowAttributes () at /home/james/otapi/bin/Release/net5.0/ubuntu.16.04-x64/publish/lib64/libFNA3D.so.0
#3 0x00007fff81e0289e in ()
#4 0x0000000004254e45 in ()
#5 0x00007ffff74f9848 in () at /home/james/otapi/bin/Release/net5.0/ubuntu.16.04-x64/publish/libcoreclr.so
#6 0x00007fffffffd080 in ()
#7 0x0000000000000000 in ()
Platform and patch info (please complete the following information):
Linux JAMES-DESKTOP 5.10.41-1-MANJARO #1 SMP PREEMPT Fri May 28 19:10:32 UTC 2021 x86_64 GNU/Linux
Terraria Server v1.4.2.3
318aec0
OTAPI.Server.Launcher compiles for AnyCPU but has a dependency on Steamworks.NET which has a ref library that targets AMD64. This causes consuming projects to raise platform mismatch warnings
Open-Terraria-API/OTAPI.Patcher/Common.cs
Line 73 in 49b9b9c
The above line causes download errors to be swallowed and displayed as "A task was canceled."
Unhandled exception. System.AggregateException: One or more errors occurred. (A task was canceled.)
---> System.Threading.Tasks.TaskCanceledException: A task was canceled.
at System.Threading.Tasks.Task.GetExceptions(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at OTAPI.Patcher.Common.DownloadZip(String url) in \Open-Terraria-API\OTAPI.Patcher\Common.cs:line 73
at OTAPI.Patcher.Targets.PCServerTarget.DownloadServer() in \Open-Terraria-API\OTAPI.Patcher\Targets\PCServerTarget.cs:line 43
at OTAPI.Patcher.Targets.PCServerTarget.Patch() in \Open-Terraria-API\OTAPI.Patcher\Targets\PCServerTarget.cs:line 88
at OTAPI.Patcher.Program.Main(String[] args) in \Open-Terraria-API\OTAPI.Patcher\Program.cs:line 28
--- End of stack trace from previous location ---
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at OTAPI.Patcher.Common.DownloadZip(String url) in \Open-Terraria-API\OTAPI.Patcher\Common.cs:line 73
at OTAPI.Patcher.Targets.PCServerTarget.DownloadServer() in \Open-Terraria-API\OTAPI.Patcher\Targets\PCServerTarget.cs:line 43
at OTAPI.Patcher.Targets.PCServerTarget.Patch() in \Open-Terraria-API\OTAPI.Patcher\Targets\PCServerTarget.cs:line 88
at OTAPI.Patcher.Program.Main(String[] args) in \Open-Terraria-API\OTAPI.Patcher\Program.cs:line 28
fwiw, my error was a network issue causing timeout
The OTAPI.Upcoming nuget packages 3.0.37-alpha reference dependencies:
ModFramework (>= 1.0.39-alpha)
MonoMod (>= 22.3.23.4)
MonoMod.RuntimeDetour (>= 22.3.23.4)
but ships binaries that are built against updated ones from 6596b5b:
ModFramework 1.0.40-alpha
MonoMod 22.5.1.1
MonoMod.RuntimeDetour 22.5.1.1
therefore requiring consumers to manually install the updated dependencies.
Overall otapi 3 works really well server side but there was a few inconsistencies compared to the original source
PlayerAnnounce hook
Originally this hook just checked if the hook was handled and returned accordingly. Now it logs to the console that the player has left or joined regardless
Netplay.Open/ClosePort()
Not sure if this is otapi related but in v2 all the code in those methods were removed.
OpenPort in v2
All of these differences are pretty subtle but they get in the way while trying to work with the server
Sorry, I understand that this god does not belong here
But I did not find a way to write it here I do not know how to crawl github.com Sorry
https://github.com/NyxStudios/Regions/blob/master/RegionManager.cs
I think it should be here
2017-08-28_10-33-13.log
2017-08-28 10:33:13 - TShock: INFO: TShock was improperly shut down. Please use the exit command in the future to prevent this.
2017-08-28 10:33:13 - TextLog: INFO: TShock 4.3.24.0 (Mintaka) now running.
2017-08-28 10:33:13 - TShock: INFO: AutoSave Enabled
2017-08-28 10:33:13 - TShock: INFO: Backups Disabled
2017-08-28 10:33:13 - TShock: INFO: Welcome to TShock for Terraria. Initialization complete.
2017-08-28 10:33:38 - RegionManager: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
at TShockAPI.DB.RegionManager.Reload()
2017-08-28 10:33:48 - Utils: INFO: Server executed: /region list.
ServerLog.txt
[08-28-17 10:33:12] [Server API] Verbose: TerrariaApi - Server v2.1.0.0 started.
[08-28-17 10:33:12] [Server API] Verbose: Command line: "C:\servers\tshock1717\TerrariaServer.exe"
[08-28-17 10:33:12] [Server API] Verbose: OS: Microsoft Windows NT 6.1.7600.0 (64bit: True)
[08-28-17 10:33:12] [Server API] Verbose: Mono: False
[08-28-17 10:33:13] [Server API] Info: Plugin TShock v4.3.24.0 (by The TShock Team) initiated.
We were thinking along the lines of when a plugin is disabled it should be persisted between starts.
This could potentially be stored using the EF DbContext (OTAContext), or even fall back to local storage.
Describe the bug
It isn't possible to maximize the game's window, doing so ends up in the action being reverted.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The windows should be maximized.
Platform and patch info (please complete the following information):
57114e0
Additional context
Despite this issue, it is possible to use the game "Fullscreen" settings. I prefer using maximized but non-fullscreen, however.
Describe the bug
It is possible to copy or cut text from the game, but not to paste text.
Attempting to copy or paste text does not do anything, cutting simply deletes the text.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It is possible to paste text in game, just as it is possible in vanilla.
Platform and patch info (please complete the following information):
8f0437f
I have been successful with building and launching this on windows 10.
However I can't for the life of me build this without errors on an Ubuntu system.
I thought i was nearly there but then it couldn't find "Terraria.WindowsLaunch" in "GameRunner.cs"
This is my current process of building following The Build Guide
Step 1. Clone Master repo
Step 2. Place the Windows ReLogic.Native.dll and Windows TerrariaServer.exe in /wrap/TerrariaServer/
Step 3. Restore OTAPI.Server.sln Nuget Packages
Step 4. Build OTAPI.Server.sln
Step 5. Build OTAPI.Patcher
Step 6. Try Run OTAPI.Patcher.exe
Error:
Then i get this error when Trying to run The patcher.exe
I thought maybe trying to restore packages but this doesn't work either...
Unhandled Exception:
Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553'
at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000f7] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00007] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00025] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x00040] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00006] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.TypeReference.Resolve () [0x00006] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.Mixin.CheckedResolve (Mono.Cecil.TypeReference self) [0x00000] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.GetConstantType (Mono.Cecil.TypeReference constant_type, System.Object constant) [0x000a1] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.AddConstant (Mono.Cecil.IConstantProvider owner, Mono.Cecil.TypeReference type) [0x00007] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.AddField (Mono.Cecil.FieldDefinition field) [0x00072] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.AddFields (Mono.Cecil.TypeDefinition type) [0x00013] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.AddType (Mono.Cecil.TypeDefinition type) [0x0008c] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.AddTypeDefs () [0x00018] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.BuildTypes () [0x00014] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.BuildModule () [0x0007e] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.BuildMetadata () [0x00000] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.ModuleWriter.BuildMetadata (Mono.Cecil.ModuleDefinition module, Mono.Cecil.MetadataBuilder metadata) [0x00008] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.ModuleWriter.WriteModuleTo (Mono.Cecil.ModuleDefinition module, System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x000ab] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.ModuleDefinition.Write (System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x00022] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x0000a] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at ILRepacking.ILRepack.Repack () [0x00385] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at OTAPI.Patcher.Program.Main (System.String[] args) [0x0034e] in <169dec57a75c4694b3259e5d2bb859df>:0
[ERROR] FATAL UNHANDLED EXCEPTION: Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553'
at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x000f7] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00007] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.DefaultAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name) [0x00025] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataResolver.Resolve (Mono.Cecil.TypeReference type) [0x00040] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.ModuleDefinition.Resolve (Mono.Cecil.TypeReference type) [0x00006] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.TypeReference.Resolve () [0x00006] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.Mixin.CheckedResolve (Mono.Cecil.TypeReference self) [0x00000] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.GetConstantType (Mono.Cecil.TypeReference constant_type, System.Object constant) [0x000a1] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.AddConstant (Mono.Cecil.IConstantProvider owner, Mono.Cecil.TypeReference type) [0x00007] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.AddField (Mono.Cecil.FieldDefinition field) [0x00072] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.AddFields (Mono.Cecil.TypeDefinition type) [0x00013] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.AddType (Mono.Cecil.TypeDefinition type) [0x0008c] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.AddTypeDefs () [0x00018] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.BuildTypes () [0x00014] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.BuildModule () [0x0007e] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.MetadataBuilder.BuildMetadata () [0x00000] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.ModuleWriter.BuildMetadata (Mono.Cecil.ModuleDefinition module, Mono.Cecil.MetadataBuilder metadata) [0x00008] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.ModuleWriter.WriteModuleTo (Mono.Cecil.ModuleDefinition module, System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x000ab] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.ModuleDefinition.Write (System.IO.Stream stream, Mono.Cecil.WriterParameters parameters) [0x00022] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.ModuleDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x0000a] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at Mono.Cecil.AssemblyDefinition.Write (System.String fileName, Mono.Cecil.WriterParameters parameters) [0x00000] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at ILRepacking.ILRepack.Repack () [0x00385] in <cb3fd49c3e8f4dc980bfa856efdddf05>:0
at OTAPI.Patcher.Program.Main (System.String[] args) [0x0034e] in <169dec57a75c4694b3259e5d2bb859df>:0
e.g. modifications is not required, but recent large changes missed this.
Describe the bug
The SendBytes hook doesn't pass the client's index into its arguments
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
Platform and patch info
I'm trying to make a plugin for DPS and % contribution to bosses calculation.
The way it works is by using TSAPI's extension of the Npc.Strike hook I add each boss to a dictionary with the needed information for the calculation. And then when the boss dies, using TSAPI's extension of the Npc.Killed hook I remove the boss from the dictionary.
It works fine for bosses like King Slime, Eye of Cthulhu and such (one part) bosses, but it gets very complicated when dealing with multiple part bosses (Skeletron Prime, Skeletron not included because their arms are not part of the boss's max health).
Eater of Worlds specifically can't be removed from the dictionary because while a part of it dies, the 'boss' is still alive.
I tried to go around it by getting the total number of segments of the boss (head and tail don't count, only type ID 14) and then only removing it after the number of segments dead is the same as total but that seemed to be less reliable as the boss split apart, and then some other bugs where I used a strong weapon and hit the boss after it was dead. All of my calculations would be possible, and easier to do if there was a hook for bosses dying with the Terraria.NPC property in it.
With such a hook, all I'd have to do is remove the NPC from my dictionary and it's done, no counting or anything.
Hello!
I've been trying to update my TShock plugin that utilizes the OTAPI.Hooks.Collision.PressurePlate
hook and it doesn't seem to work.
To test this out, I've written a simple OTAPI Server that utilizes this hook.
Even on this server, the hook wouldn't trigger.
I've attached my code in the spoiler below.
Other hooks work as one would expect.
Target framework: .net6.0
Built on the latest version of OTAPI (3.1.20
) got from NuGet
using OTAPI;
using Terraria;
namespace OTest;
internal abstract class Program
{
private static void Main(string[] args)
{
Console.WriteLine("Starting....");
On.Terraria.Main.DedServ += OnDedicatedServer;
Hooks.Collision.PressurePlate += OnPressurePlate;
Hooks.NetMessage.PlayerAnnounce += OnPlayerAnnounce;
WindowsLaunch.Main(args);
}
private static void OnDedicatedServer(On.Terraria.Main.orig_DedServ orig, Main self)
{
Console.WriteLine("Dedicated server start!");
orig(self);
}
private static void OnPressurePlate(object? sender, Hooks.Collision.PressurePlateEventArgs args)
{
Console.WriteLine($"Entity {args.Entity.entityId} triggered pressure plate");
}
private static void OnPlayerAnnounce(object? sender, Hooks.NetMessage.PlayerAnnounceEventArgs args)
{
Console.WriteLine($"Announcing player: {args.Text}");
}
}
Currently thinking for use when a password is being assigned (say for an API account, player/server passwords or RCON in TDSM's case).
As you can see here, Arg1
is being initialized instead of Format
.
Describe the bug
Installing and starting OTAPI fails during load of HostGamePlugin
To Reproduce
/home/james/.steam/steam/steamapps/common/Terraria/
Expected behavior
No load error exception
Stack trace
here
Platform and patch info (please complete the following information):
Linux JAMES-DESKTOP 5.10.41-1-MANJARO #1 SMP PREEMPT Fri May 28 19:10:32 UTC 2021 x86_64 GNU/Linux
Terraria Server v1.4.2.3
318aec0
This is a reminder, so I don't forget.
Describe the bug
OTAPI also included make clients with using Terraria's source code but it does not start the client because XNA Modification removes main bootable code.
To Reproduce
Expected behavior
The client should start without issues.
Actual result
Client can not be started because XNA method Microsoft.Xna.Framework.Game.Run()
was removed from OTAPI due XNA modification.
Notes: Client OTAPI can not be compiled without this modification. Both real Terraria and OTAPI checked with decompiler. Original one contains the boot code but OTAPI does not. Also this is not the only critical method removed from the OTAPI due the modification.
Stack trace
at OTAPI.Tests.Common.dll.GameRunner.Main (IL offset: 0x6a)
at OTAPI.Tests.Common.dll.GameRunner.Menu (IL offset: 0x12d)
at OTAPI.Tests.Common.dll.<>c__DisplayClass5_0.<Menu>b__0 (IL offset: 0xc)
at OTAPI.Tests.Common.dll.GameRunner.StartGame (IL offset: 0x12)
at OTAPI.dll.WindowsLaunch.Main (IL offset: 0x30)
at OTAPI.dll.Program.LaunchGame (IL offset: 0xffffffff)
System.MissingMethodException: Metot bulunamadı: 'Void Microsoft.Xna.Framework.Game.Run()'.
konum: Terraria.Program.LaunchGame(String[] args, Boolean monoArgs)
konum: Terraria.WindowsLaunch.Main(String[] args)
konum: OTAPI.Tests.Common.GameRunner.StartGame(String[] args) \Open-Terraria-API-master\OTAPI.Tests\OTAPI.Tests.Common\GameRunner.cs içinde: satır 92
konum: OTAPI.Tests.Common.GameRunner.<>c__DisplayClass5_0.<Menu>b__0() \Open-Terraria-API-master\OTAPI.Tests\OTAPI.Tests.Common\GameRunner.cs içinde: satır 113
konum: OTAPI.Tests.Common.GameRunner.Menu(String[] args) \Open-Terraria-API-master\OTAPI.Tests\OTAPI.Tests.Common\GameRunner.cs içinde: satır 147
konum: OTAPI.Tests.Common.GameRunner.Main(String[] args) \Open-Terraria-API-master\OTAPI.Tests\OTAPI.Tests.Common\GameRunner.cs içinde: satır 61
Screenshots
Not available.
Platform and patch info (please complete the following information):
This is a rather broad topic & issue, but I'll try to get straight to the point.
As it currently stands, the client isn't very user friendly in my opinion, for a few reasons:
Many many files:
the folder contains many files and subfolders, that could maybe be organised better.
Could have a DLL folder for all libraries, a subfolder for each kind (FNA gets its subfolder, Avalonia too, etc), a folder for OTAPI MFW modifications, and maybe moving (or deleting?) the installation, single use files somewhere else.
Leftover test files:
Some testing files for the MFW mods were left there, and while this can provide examples, I think that by default no scripts should be preinstalled, and only up to the user to do this.
MFW lacks documentation about plugins/scripts:
I have searched a bit, and I couldn't find any tutorial other than the examples given already. Examples are nice, but they don't teach much more than what one is able to salvage from them. If possible I'd greatly appreciate to see a MFW wiki being created, but I'm aware that it may take time.
Basic UI?
Not really a great point, more of a nitpick, but I think that the launcher's UI could be improved. This I could do a PR probably.
Once I clicked "Build otapi" instead of "Launch otapi", I think you can understand my pain.
I think that it is potentially the best Terraria modding framework, but it may become not broadly used due to this^. Of course it is quite niche compared to tML, but I believe it could be used for things such as server custom clients - in that case being user-friendly would be worthwhile.
The server throws with this message upon killing an NPC
Tested on commit 50e269a (Windows 10; Terraria v1.4.3.5)
If a section is very complicated, it's size will overflow the buffer. Clients recieved the broken tiles data and throw an exception, it causes the section can't be shown correctly.
This bug only exists in modified server, vanilla server works well.
Expand the buffer can solve it as I tried.
start-server files still point to tdsm.exe which is now TerrariaServer.exe
Debugger Output:
System.ArgumentNullException: 'Value can not be null. Parameter Name: parameter'
at \OTAPI.Patcher.Engine\Extensions\ILProcessor\Insert.cs line 67
Console Output:
-> Hooking Chest.PutItemInNearbyChest...
Error executing modification QuickStack: Exception has been thrown by the target of an invocation.
at: System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at: System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at: System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at: System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at: OTAPI.Patcher.Engine.Extensions.ILProcessor.InsertExtensions.AnonymousToInstruction(Object anon) \OTAPI.Patcher.Engine\Extensions\ILProcessor\Insert.cs: line 67
at: OTAPI.Patcher.Engine.Extensions.ILProcessor.InsertExtensions.InsertAfter(ILProcessor processor, Instruction target, Object[] instructions) \OTAPI.Patcher.Engine\Extensions\ILProcessor\Insert.cs: line 86
at: OTAPI.Patcher.Engine.Modifications.Hooks.Item.QuickStack.Run() \OTAPI.Modifications\OTAPI.Modifications.Chest.Item.Add\Modifications\QuickStack.cs: line 29
at: OTAPI.Patcher.Engine.Patcher.RunModifications() \OTAPI.Patcher.Engine\Patcher.cs: line 256
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.