Please help create a script

Want Cheat Engine to do something specific and no idea how to do that, ask here. (From simple scripts to full trainers and extensions)
Post Reply
ModSoul
Noobzor
Noobzor
Posts: 7
Joined: Thu Oct 29, 2020 3:06 pm
Reputation: 4

Please help create a script

Post by ModSoul »

I'm playing bleach brave souls and I want to change some methods, I can edit assembly csharp directly but I want to make it for CE so I can turn on/off while playing the game, the problem is I'm not familiar and don't have any experience with CE, here is what I want to changes

Original code for Bleach.Games.Common.Masters:EnemyMaster:get_Hp

Code: Select all

public int get_Hp()
{
	return this.<Hp>k__BackingField;
}
Change to

Code: Select all

public int get_Hp()
{
	return 1;
}
Original code for Bleach.Games.Common.Masters:EnemyMaster:get_Attack

Code: Select all

public int get_Attack()
{
	return this.<Attack>k__BackingField;
}
Change to

Code: Select all

public int get_Attack()
{
	return 1;
}
Original code for Bleach.Games.Common.Characters.Attack:AttackCoolTime:MaxTime

Code: Select all

public float get_MaxTime()
{
	return this.<MaxTime>k__BackingField;
}
Change to

Code: Select all

public int get_MaxTime()
{
	return 0f;
}
Sorry for my bad english

aSwedishMagyar
Table Makers
Table Makers
Posts: 670
Joined: Mon Jul 06, 2020 3:19 am
Reputation: 1188

Re: Please help create a script

Post by aSwedishMagyar »

ModSoul wrote:
Tue Nov 03, 2020 1:00 am
I'm playing bleach brave souls and I want to change some methods, I can edit assembly csharp directly but I want to make it for CE so I can turn on/off while playing the game, the problem is I'm not familiar and don't have any experience with CE, here is what I want to changes

Original code for Bleach.Games.Common.Masters:EnemyMaster:get_Hp
I dont have this game so this is just a simplified explanation that should get you on the right track.

For starters, it looks like this game uses mono. If so, Cheat engine has a mono dissector in which you can browse classes and their respective methods and parameters/variables. If you find a function in the csharp.dll that you want to modify, you need to find it in the mono class dissector (notice the Bleach.Games.Common.Masters part before the function get_Hp?). Once you find the method you can right click it and select JIT which will bring you to its location in memory where you can edit whatever part you are looking for. It is probably a float or double value and with a function as simple as "get_xxx" its normally a single line or at most 5 to 10.

It may have to setup the pointer in which case there will be a few mov, lea, or even a call before that final load. From there you can just directly modify the value passed back.

Keep in mind that if that class is used by enemies and the player, you will likely have to some extra compares to prevent modifying values for the wrong type.

ModSoul
Noobzor
Noobzor
Posts: 7
Joined: Thu Oct 29, 2020 3:06 pm
Reputation: 4

Re: Please help create a script

Post by ModSoul »

aSwedishMagyar wrote:
Tue Nov 03, 2020 1:37 am
ModSoul wrote:
Tue Nov 03, 2020 1:00 am
I'm playing bleach brave souls and I want to change some methods, I can edit assembly csharp directly but I want to make it for CE so I can turn on/off while playing the game, the problem is I'm not familiar and don't have any experience with CE, here is what I want to changes

Original code for Bleach.Games.Common.Masters:EnemyMaster:get_Hp
I dont have this game so this is just a simplified explanation that should get you on the right track.

For starters, it looks like this game uses mono. If so, Cheat engine has a mono dissector in which you can browse classes and their respective methods and parameters/variables. If you find a function in the csharp.dll that you want to modify, you need to find it in the mono class dissector (notice the Bleach.Games.Common.Masters part before the function get_Hp?). Once you find the method you can right click it and select JIT which will bring you to its location in memory where you can edit whatever part you are looking for. It is probably a float or double value and with a function as simple as "get_xxx" its normally a single line or at most 5 to 10.

It may have to setup the pointer in which case there will be a few mov, lea, or even a call before that final load. From there you can just directly modify the value passed back.

Keep in mind that if that class is used by enemies and the player, you will likely have to some extra compares to prevent modifying values for the wrong type.
Thanks for your help, and what should I do after this?

Before modified
[Link] [Link] [Link]

After modified
[Link] [Link] [Link]

This is free to play game and if you don't mind to download it, the game size only around 2GB

User avatar
Cake-san
Table Makers
Table Makers
Posts: 425
Joined: Sun Mar 26, 2017 4:32 pm
Reputation: 770

Re: Please help create a script

Post by Cake-san »

Are you sure that method is being called by other method ?
Because if a method is too short , compiler will combine the larger method's body with that method body instead of larger method calling that method...
You can try break&trace or set a breakpoint or find out what that function access to see if it being run...

ModSoul
Noobzor
Noobzor
Posts: 7
Joined: Thu Oct 29, 2020 3:06 pm
Reputation: 4

Re: Please help create a script

Post by ModSoul »

Cake-san wrote:
Wed Nov 04, 2020 8:05 pm
Are you sure that method is being called by other method ?
Because if a method is too short , compiler will combine the larger method's body with that method body instead of larger method calling that method...
You can try break&trace or set a breakpoint or find out what that function access to see if it being run...
Sorry but I don't understand what you mean because I don't have any experience with CE
My images only show before and after I edit assembly csharp not using CE, that's why I ask for help here how to make something like that with CE

User avatar
sanitka
Expert Cheater
Expert Cheater
Posts: 450
Joined: Sat Aug 22, 2020 5:40 am
Reputation: 194

Re: Please help create a script

Post by sanitka »

How about to change .NET method to contain a boolean and a condition based on that boolean ?
And in CE just have this boolean ?

ie.

Code: Select all

bool isCheatEnabled = false;

if (isCheatEnabled) then
  return 1;
else
  return this.<Hp>k__BackingField;
btw. You will have to learn at least basics of CE to be able to do find the variable (its address).

User avatar
YoucefHam
Expert Cheater
Expert Cheater
Posts: 92
Joined: Sun Jan 21, 2018 10:21 pm
Reputation: 202

Re: Please help create a script

Post by YoucefHam »

Hi there ;) , try this script

Code: Select all

{$lua}
LaunchMonoDataCollector()  --Enable Mono Features
{$asm}
[ENABLE]
Bleach.Games.Common.Masters:EnemyMaster:get_Hp:
mov rax,01 //put the value to your max HP
ret
//db 48 B8 01 00 00 00 00 00 00 00 C3

Bleach.Games.Common.Masters:EnemyMaster:get_Attack:
mov rax,01 //01 mean True - 00 mean False 
ret
//db 48 B8 01 00 00 00 00 00 00 00 C3

Bleach.Games.Common.Characters.Attack:AttackCoolTime:MaxTime:get_MaxTime:
mov [rbx],(float)100  //put the value that you want
mov rax,[rbx]
movss xmm0,[rbx]
ret
//db C7 03 00 00 C8 42 48 8B 03 F3 0F 10 03 C3

[DISABLE]

Bleach.Games.Common.Masters:EnemyMaster:get_Hp:
db 48 83 EC 08 48 89 0C 24 48 8B C1 //Its best to copy All the function Bytes

Bleach.Games.Common.Masters:EnemyMaster:get_Attack:
db 48 83 EC 08 48 89 0C 24 48 8B C1 //Its best to copy All the function Bytes

Bleach.Games.Common.Characters.Attack:AttackCoolTime:MaxTime:get_MaxTime:
db 48 83 EC 08 48 89 0C 24 48 8B C1 F3 0F 10 40 38 0F 5A C0 //Its best to copy All the function Bytes

Post Reply

Who is online

Users browsing this forum: No registered users