Adding code

Anything Cheat Engine related, bugs, suggestions, helping others, etc..
Post Reply
Lorizzuoso
Noobzor
Noobzor
Posts: 13
Joined: Wed Apr 20, 2022 6:17 pm
Reputation: 0

Adding code

Post by Lorizzuoso »

Is it possible to add code instead of just pasting it?
Context: I want a game to load a character into a cutscene but there are only 2 slots and all characters loaded end with 4 FF'S so if I insert another character before those FF the game should load another character

User avatar
Toga
Expert Cheater
Expert Cheater
Posts: 243
Joined: Wed Mar 03, 2021 1:11 pm
Reputation: 98

Re: Adding code

Post by Toga »

Lorizzuoso wrote:
Wed Apr 20, 2022 6:22 pm
Is it possible to add code ...
I am just a newbie but for your understanding
most of the hacks here works by "adding" code instead of replacing
simply by the fact that the replacing code is often larger as the original code.

Your question about inserting another character, could be or not be possible but
adding another slot would always/most of the time means adding code

-edit-: the thing is CE is made for that purpose, unlike x64dbg, you make a table not an executable patcher, so adding ain't a bad thing

Lorizzuoso
Noobzor
Noobzor
Posts: 13
Joined: Wed Apr 20, 2022 6:17 pm
Reputation: 0

Re: Adding code

Post by Lorizzuoso »

I know that it's possible because it's been done before but only if you modify the files themselves with HxD with copy and insert but that would mean rebuilding the iso each time(it's a ps2 game)

User avatar
Toga
Expert Cheater
Expert Cheater
Posts: 243
Joined: Wed Mar 03, 2021 1:11 pm
Reputation: 98

Re: Adding code

Post by Toga »

^ even if it's done before, it depends on the game / code
as long as the replacement code is smaller or the same lenght of bytes there should be any problem.

Things get way more difficult when the replacement code is larger ( ie. doesn't fit in the original code / iso )

Lorizzuoso
Noobzor
Noobzor
Posts: 13
Joined: Wed Apr 20, 2022 6:17 pm
Reputation: 0

Re: Adding code

Post by Lorizzuoso »

Ok so the code is like this:
01 00 00 01 00 00 00 00(one character),then after a few of these there are 4 FF'S so FF FF FF FF and that's where the game stops loading the characters so instead of replacing the already loaded characters I would want to add another "01 00 00 01 00 00 00 00" before those FF's

User avatar
Toga
Expert Cheater
Expert Cheater
Posts: 243
Joined: Wed Mar 03, 2021 1:11 pm
Reputation: 98

Re: Adding code

Post by Toga »

^ ok so what do you think yourself? is there room for adding another "01 00 00 01 00 00 00 00" without
"breaking"/corrupting the iso ?

User avatar
Toga
Expert Cheater
Expert Cheater
Posts: 243
Joined: Wed Mar 03, 2021 1:11 pm
Reputation: 98

Re: Adding code

Post by Toga »

ps. i think you are better of reading some of the how to use CE with emulators

Lorizzuoso
Noobzor
Noobzor
Posts: 13
Joined: Wed Apr 20, 2022 6:17 pm
Reputation: 0

Re: Adding code

Post by Lorizzuoso »

I mean yeah if you add another character before the FF's yes that shouldn't be a problem,but idk how to add those bytes in CE withous modifiyng the game files

Post Reply

Who is online

Users browsing this forum: No registered users