Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[solved]Do I need a pointer?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
atnip
How do I cheat?
Reputation: 0

Joined: 07 Jan 2021
Posts: 5
Location: United States

PostPosted: Fri Jan 08, 2021 2:03 pm    Post subject: [solved]Do I need a pointer? Reply with quote

In my last post I was having trouble finding the address for the the main menu but I've since found it and my most recent issue is trying to find out if I even need a pointer map in my code below.

Code:
state("BorderlandsGOTY")
{
   // General data pointers that we use for if we're on the main menu
   bool isMainMenu : "BorderlandsGOTY.exe", 0x02544B18, 0xe8, 0x108, 0xd4,  0xfc;
   // If mainMenu2 is == 153 OR 139, we're [probably] on the main menu
   int  mainMenu2 : "BorderlandsGOTY.exe", 0x242478C;

   // A proper boolean that returns true when we're loading
   bool isLoading  : "BorderlandsGOTY.exe", 0x25C2A1C;
   bool isLoading2 : "BorderlandsGOTY.exe", 0x25C20FC;
   // An integer value that is == 46179 when we're saving our game
   int  isSavingGame : "BorderlandsGOTY.exe", 0x025489E0, 0x4c0, 0x760, 0x78;
}

// We wanna pause the IGT timer if we're loading, in the main menu, or doing a save & quit.
isLoading
{
   return (current.isLoading || current.isLoading2) || (current.isMainMenu || current.mainMenu2 == 153 || current.mainMenu2 == 139) || current.isSavingGame == 46179;
}

init
{
    timer.IsGameTimePaused = false;
    game.Exited += (s, e) => timer.IsGameTimePaused = true;
}

// Pause the timer whenever the game closes cause this game has memory leaks.
exit
{
   timer.IsGameTimePaused = true;
}


The pointers have since been made useless due to game updates.
What were looking at here is isMainMenu and mainMenu2. Do I still need to use pointers for these two? the addresses are static so having a pointer seems like extra work but at the same time im not exactly sure how to use anything other than pointers in the code.

more info about the address: when im in the main menu the value of the address is 153 for mainMenu2 and for isMainMenu the value is always 601 while in the menu. But out of the main menu these values are random but the address is static. Dont know if this is useful information.


Last edited by atnip on Fri Jan 08, 2021 7:35 pm; edited 1 time in total
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 198

Joined: 25 Jan 2006
Posts: 8517
Location: 127.0.0.1

PostPosted: Fri Jan 08, 2021 2:31 pm    Post subject: Reply with quote

If the game receives updates often, using AoB patterns would be more ideal. Static addresses will break when the game updates next, just like a pointer generally will as the base pointer used is generally static.

I'm not personally familiar with LiveSplit, but it looks more or less like that option is not directly exposed to their scripting language setup. But they offer it if you custom make a component instead.

https://github.com/fatalis/SourceSplit looks to make heavy use of pattern scans instead of hardcoded offsets if you are interested in making one yourself for Borderlands that uses patterns instead.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
atnip
How do I cheat?
Reputation: 0

Joined: 07 Jan 2021
Posts: 5
Location: United States

PostPosted: Fri Jan 08, 2021 2:42 pm    Post subject: Reply with quote

the game is probably, hopefully, never going to receive an update again. Its only been updated once since launch. I think what ill do is just use the static addresses in place of the old pointers and if it breaks later on Ill revisit this thread and try out AoB patterns or I'll just change it again seeing as though it only takes around 20 minutes to find the address. Thanks! I would try out what you suggested but lord that looks so complicated XD one day ill be skilled enough to tackle those solutions.
_________________
In 200 years you and everyone who knows you will be dead so have fun! Live life to the fullest.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites