Page 15 of 15

Re: Two Point Hospital

Posted: Sat Mar 19, 2022 3:28 pm
by Karnifeks
At this moment is 1.29.40 :P

Re: Two Point Hospital

Posted: Tue Mar 22, 2022 3:34 am
by vegimata

Re: Two Point Hospital

Posted: Fri Mar 25, 2022 1:28 pm
by topgamer
vegimata wrote:
Sun Jun 21, 2020 5:25 am
Ok, here's the latest
thank you so much!

Re: Two Point Hospital

Posted: Mon Aug 29, 2022 9:27 am
by dnag08
1.29.54 on pc gamepass as of now :D

Re: Two Point Hospital

Posted: Thu Sep 01, 2022 11:19 am
by mosesmoon
dnag08 wrote:
Mon Aug 29, 2022 9:27 am
1.29.54 on pc gamepass as of now :D
Uploaded v1.29.54+2022-06-20.1957.

Re: Two Point Hospital

Posted: Thu Sep 01, 2022 5:23 pm
by josh2tk89
Sweet. Thanks

Re: Two Point Hospital

Posted: Wed Oct 19, 2022 4:34 pm
by yavin03
mosesmoon wrote:
Thu Sep 01, 2022 11:19 am
dnag08 wrote:
Mon Aug 29, 2022 9:27 am
1.29.54 on pc gamepass as of now :D
Uploaded v1.29.54+2022-06-20.1957.
I cant activate "Enable Console", probably just got updated

Re: Two Point Hospital

Posted: Fri Dec 16, 2022 1:47 am
by millerjones
It has been months and still no updates.

None of them work on here anymore including the Dev console.

Please update.

Re: Two Point Hospital

Posted: Thu Mar 16, 2023 6:55 pm
by exxuse
can u update pls?

Re: Two Point Hospital

Posted: Sat Mar 25, 2023 11:28 am
by Alraya
koderkrazy wrote:
Thu Oct 25, 2018 3:51 am
Junkers80 wrote:
Tue Oct 23, 2018 5:00 pm
...
Rubyelf wrote:
Tue Oct 23, 2018 8:03 pm
...
There is only one line change in each dll. So should be easy to do.
I won't mind people doing it themselves and uploading here.

Here are steps to enable the console.
A. Tools setup:
1. You'll need ILSpy with Reflexil to edit the game C# dlls.
2. Get it from here [Link]
3. Extract it and run ILSpy.exe
4. Select all and remove all existing opened dlls/entries in left pane.
5. Open both the dlls(Assembly-CSharp.dll and Assembly-CSharp-firstpass.dll)
from \Two Point Hospital\TPH_Data\Managed folder.
Note: open dlls from game installation folder only, because ILSpy referes other dlls near it to decompile code.

B. Enabling console:
1. In ILSpy expand Assembly-CSharp->TH20->App->App(GraphicRaycaster,...)
2. In constructor App(...) we need to remove following code:
ConsoleController consoleController = UnityEngine.Object.FindObjectOfType<ConsoleController>();
consoleController.ToggleKey = KeyCode.None;

3. Select the code and click on Reflexil icon in toolbar(gear wheel icon). It'll open one panel below code.
4. In instructions tab It'll show opcode for the entire method.
5. Around lines 335-339 you'll find opcods(5 lines) for above instructions.
Select them all and right click then select replace with NOP. See image below.
[Link]
6. Now select Assembly-CSharp from left pane, right click and select save as. Save patched file.

C. Registering commands:
1. Developers have removed code that registers commands. To register commands we need to add the code back again.
2. In left pane now select Assembly-CSharp-firstpass->UnityConsole->ConsoleCommandDatabase->RegisterCommand(String,...)
3. In Reflexil's instruction tab, right click and select opction 'Replace all with code...'. It'll open compile window.
4. On bottom select Compile profile 'UnitySilverLight'.
5. In the method paste this line:
Database[command] = new ConsoleCommand(command, description, usage, callback);
See image below.
[Link]
6. Now click on compile. It enables Ok button. Click on Ok. Note: If you get compile error then do google for solution.
7. In left pane select Assembly-CSharp-firstpass and right click-> select 'save as'. Save patched dll.
This guide is still workable and possible to follow. I no longer have TPH installed but if you follow the instructions above, you will be able to patch your own Assembly-CSharps every time the game updates.
The only difference is that
ConsoleController consoleController = UnityEngine.Object.FindObjectOfType<ConsoleController>();
consoleController.ToggleKey = KeyCode.None;

has changed to something shorter a while back, just search for a line with UnityEngine.Object.FindObjectOfType<ConsoleController>() (still ends with KeyCode.None; tho)
and the lines to replace with NOP are like 100-150 lines lower and shortened to just 3 lines.
The commands registering should be unchanged.

Re: Two Point Hospital

Posted: Wed Apr 12, 2023 11:27 pm
by DeanV255
I've given the above a shot but not had much luck, originally I was getting a few errors/crashes whilst using updated editions of the suggested software, having more luck with some older editions and will see if I can get a new .dll's done and tested.

[Edit]
After fighting a compile bug I was able to get the console working, please see attached. After racking my brain to remember the console command I double checked to make sure it was working.

TPH_1.29.52+2022-06-10.1022-build-10745388

Re: Two Point Hospital

Posted: Tue Jun 27, 2023 12:35 pm
by Extricated
Alraya wrote:
Sat Mar 25, 2023 11:28 am
koderkrazy wrote:
Thu Oct 25, 2018 3:51 am
Junkers80 wrote:
Tue Oct 23, 2018 5:00 pm
...
Rubyelf wrote:
Tue Oct 23, 2018 8:03 pm
...
There is only one line change in each dll. So should be easy to do.
I won't mind people doing it themselves and uploading here.

Here are steps to enable the console.
A. Tools setup:
1. You'll need ILSpy with Reflexil to edit the game C# dlls.
2. Get it from here [Link]
3. Extract it and run ILSpy.exe
4. Select all and remove all existing opened dlls/entries in left pane.
5. Open both the dlls(Assembly-CSharp.dll and Assembly-CSharp-firstpass.dll)
from \Two Point Hospital\TPH_Data\Managed folder.
Note: open dlls from game installation folder only, because ILSpy referes other dlls near it to decompile code.

B. Enabling console:
1. In ILSpy expand Assembly-CSharp->TH20->App->App(GraphicRaycaster,...)
2. In constructor App(...) we need to remove following code:
ConsoleController consoleController = UnityEngine.Object.FindObjectOfType<ConsoleController>();
consoleController.ToggleKey = KeyCode.None;

3. Select the code and click on Reflexil icon in toolbar(gear wheel icon). It'll open one panel below code.
4. In instructions tab It'll show opcode for the entire method.
5. Around lines 335-339 you'll find opcods(5 lines) for above instructions.
Select them all and right click then select replace with NOP. See image below.
[Link]
6. Now select Assembly-CSharp from left pane, right click and select save as. Save patched file.

C. Registering commands:
1. Developers have removed code that registers commands. To register commands we need to add the code back again.
2. In left pane now select Assembly-CSharp-firstpass->UnityConsole->ConsoleCommandDatabase->RegisterCommand(String,...)
3. In Reflexil's instruction tab, right click and select opction 'Replace all with code...'. It'll open compile window.
4. On bottom select Compile profile 'UnitySilverLight'.
5. In the method paste this line:
Database[command] = new ConsoleCommand(command, description, usage, callback);
See image below.
[Link]
6. Now click on compile. It enables Ok button. Click on Ok. Note: If you get compile error then do google for solution.
7. In left pane select Assembly-CSharp-firstpass and right click-> select 'save as'. Save patched dll.
This guide is still workable and possible to follow. I no longer have TPH installed but if you follow the instructions above, you will be able to patch your own Assembly-CSharps every time the game updates.
The only difference is that
ConsoleController consoleController = UnityEngine.Object.FindObjectOfType<ConsoleController>();
consoleController.ToggleKey = KeyCode.None;

has changed to something shorter a while back, just search for a line with UnityEngine.Object.FindObjectOfType<ConsoleController>() (still ends with KeyCode.None; tho)
and the lines to replace with NOP are like 100-150 lines lower and shortened to just 3 lines.
The commands registering should be unchanged.
Does anyone know if it's possible to use this to get access to the DebugAddPrimeEntitlement() function?

Re: Two Point Hospital

Posted: Mon Jul 03, 2023 2:30 pm
by Blob55
Can someone PLEASE just add in a cheat that adds in all Superbug items! My WHOLE PROGRESS got deleted and now the game's dead, so I can't get them back!!!

Re: Two Point Hospital

Posted: Mon Jul 03, 2023 3:00 pm
by Blob55
Alraya wrote:
Sat Mar 25, 2023 11:28 am
koderkrazy wrote:
Thu Oct 25, 2018 3:51 am
Junkers80 wrote:
Tue Oct 23, 2018 5:00 pm
...
Rubyelf wrote:
Tue Oct 23, 2018 8:03 pm
...
There is only one line change in each dll. So should be easy to do.
I won't mind people doing it themselves and uploading here.

Here are steps to enable the console.
A. Tools setup:
1. You'll need ILSpy with Reflexil to edit the game C# dlls.
2. Get it from here [Link]
3. Extract it and run ILSpy.exe
4. Select all and remove all existing opened dlls/entries in left pane.
5. Open both the dlls(Assembly-CSharp.dll and Assembly-CSharp-firstpass.dll)
from \Two Point Hospital\TPH_Data\Managed folder.
Note: open dlls from game installation folder only, because ILSpy referes other dlls near it to decompile code.

B. Enabling console:
1. In ILSpy expand Assembly-CSharp->TH20->App->App(GraphicRaycaster,...)
2. In constructor App(...) we need to remove following code:
ConsoleController consoleController = UnityEngine.Object.FindObjectOfType<ConsoleController>();
consoleController.ToggleKey = KeyCode.None;

3. Select the code and click on Reflexil icon in toolbar(gear wheel icon). It'll open one panel below code.
4. In instructions tab It'll show opcode for the entire method.
5. Around lines 335-339 you'll find opcods(5 lines) for above instructions.
Select them all and right click then select replace with NOP. See image below.
[Link]
6. Now select Assembly-CSharp from left pane, right click and select save as. Save patched file.

C. Registering commands:
1. Developers have removed code that registers commands. To register commands we need to add the code back again.
2. In left pane now select Assembly-CSharp-firstpass->UnityConsole->ConsoleCommandDatabase->RegisterCommand(String,...)
3. In Reflexil's instruction tab, right click and select opction 'Replace all with code...'. It'll open compile window.
4. On bottom select Compile profile 'UnitySilverLight'.
5. In the method paste this line:
Database[command] = new ConsoleCommand(command, description, usage, callback);
See image below.
[Link]
6. Now click on compile. It enables Ok button. Click on Ok. Note: If you get compile error then do google for solution.
7. In left pane select Assembly-CSharp-firstpass and right click-> select 'save as'. Save patched dll.
This guide is still workable and possible to follow. I no longer have TPH installed but if you follow the instructions above, you will be able to patch your own Assembly-CSharps every time the game updates.
The only difference is that
ConsoleController consoleController = UnityEngine.Object.FindObjectOfType<ConsoleController>();
consoleController.ToggleKey = KeyCode.None;

has changed to something shorter a while back, just search for a line with UnityEngine.Object.FindObjectOfType<ConsoleController>() (still ends with KeyCode.None; tho)
and the lines to replace with NOP are like 100-150 lines lower and shortened to just 3 lines.
The commands registering should be unchanged.
I can't find a version with an .exe! That link is broken and the only stuff I can find is on Github!