| 
			
				|  | Cheat Engine The Official Site of Cheat Engine
 
 
 |  
 
	
		| View previous topic :: View next topic |  
		| Author | Message |  
		| Qiuzy How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 22 Dec 2024
 Posts: 6
 
 
 | 
			
				|  Posted: Mon Feb 03, 2025 3:37 am    Post subject: Calling Mono method crashed the game in a strange way |   |  
				| 
 |  
				| Hi, 
 I tried to use aa script to call the mono game method `UpdateQuest`, which manages the player's new tasks and progress. The strange thing about it is: the script ran without problems when I just launched the game and loaded the save. BUT after I proceeded with a task or finished one in the gameplay (both would trigger the game process to use the `UpdateQuest` method), calling the method with the same aa script often led to a game crash.
 
 I know the game had less free memory because `alloc()` often allocated memory over 2 GB away from where the method was located. Does that have anything to do with this crash?
 
 Here is my script (I am sure the mono feature was opened when used):
 
  	  | Code: |  	  | [ENABLE]
 
 alloc(InvokeMonoClassMethod, $100)
 createThread(InvokeMonoClassMethod)
 alloc(self, 8)
 
 InvokeMonoClassMethod:
 sub rsp,28
 call mono-2.0-bdwgc.mono_get_root_domain
 mov rcx,rax
 call mono-2.0-bdwgc.mono_thread_attach
 mov [self], rax
 mov rcx,23A26ABC1E0    // the QuestData class instance
 mov rdx,83D                  // questID
 mov r8d,1                      // quest progress
 mov r9d,1                      // progress status
 call QuestData:UpdateQuest
 mov rcx,[self]
 call mono-2.0-bdwgc.mono_thread_detach
 add rsp,28
 ret
 
 [DISABLE]
 dealloc(self)
 dealloc(InvokeMonoClassMethod)
 
 | 
 |  |  
		| Back to top |  |  
		|  |  
		| Dark Byte Site Admin
 
  Reputation: 470 
 Joined: 09 May 2003
 Posts: 25807
 Location: The netherlands
 
 | 
			
				|  Posted: Mon Feb 03, 2025 8:04 am    Post subject: |   |  
				| 
 |  
				| likely the QuestData class instance (23A26ABC1E0) changed upon loading a save/restart the game _________________
 
 Do not ask me about online cheats. I don't know any and wont help finding them.
 Like my help? Join me on Patreon so i can keep helping
 |  |  
		| Back to top |  |  
		|  |  
		| Qiuzy How do I cheat?
 
 ![]() Reputation: 0 
 Joined: 22 Dec 2024
 Posts: 6
 
 
 | 
			
				|  Posted: Mon Feb 03, 2025 12:35 pm    Post subject: |   |  
				| 
 |  
				| No, it wasn't. 	  | Dark Byte wrote: |  	  | likely the QuestData class instance (23A26ABC1E0) changed upon loading a save/restart the game | 
 
 It is not a script for automation. I got the instance address from another script and then copy-pasted it back here in this script whenever restarting the game process. I also ensured the instance address hadn't changed when I proceeded/finished a quest in-game.
 
 The crashing went as follows:
 
1. Launched the game
 2. Loaded a save
 3. Ran script 1 to get the instance address of `QuestData`
 4. Copy-pasted the address back to this script, right after `mov rcx,`
 5. I hadn't done anything about quests in the game so far
 6. Ran this script multiple times with different rdx, r8, r9, all succeeded
 7. Proceeded with any quest in the game, the game itself would use the same method to update quest statuses
 8. Used script 1 to check the instance address of `QuestData` wasn't changed
 8. Ran this script again, the game crashed (not always but often)
 
 
 I've checked everything I could. Quite frustrating.
 |  |  
		| Back to top |  |  
		|  |  
		|  |  
  
	| 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 You cannot attach files in this forum
 You can download files in this forum
 
 |  |