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 


Find a specific value which is shared between objects

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
fakerlol
Newbie cheater
Reputation: 0

Joined: 06 Feb 2016
Posts: 21

PostPosted: Thu May 21, 2020 10:22 am    Post subject: Find a specific value which is shared between objects Reply with quote

So I've been looking into writing a specific mod of some sorts for Borderlands 3.

The idea is to automatically categorize picked-up items as "junk" when the rarity of the item is under a specified value.

So finding out the adress of the picked-up item was quite straight forward. What I get is the adress of the item in the specific item-slot in the inventory.

Through already made Cheat Tables I could gather some offsets to values like Sell Value, Level Req. etc.

What I need now is to find the offset to the rarity of the item (which is represented as a color from white, green, blue, purple and 'orange').

I'm quite stumped how to tackle this problem.

I can get a list of different item-objects with the same or different rarities but how do I find the offset of the rarity when it's an unchangeable value? At this point in time I don't even know if the rarity is an integer-type or an adress to some sort of object that describes the rarity.

Do you have any hints as to how I can proceed here?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Thu May 21, 2020 10:40 am    Post subject: Reply with quote

No clue how it works in BL3, but in BL2 I'm pretty sure it was dynamically calculated at runtime based on the parts the weapon consists of.
If this holds true for BL3 as well, you can find and call the function that calculates the rarity. This might not be too bad if you know assembly.
Alternatively, find some cached value after the game calculates it. Might be easy or impractical.

If you really think it is a value, find several structures of weapons, put them in the structure dissector, group them together based on their rarity, and look for similarities/differences within/between groups.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
fakerlol
Newbie cheater
Reputation: 0

Joined: 06 Feb 2016
Posts: 21

PostPosted: Thu May 21, 2020 12:34 pm    Post subject: Reply with quote

ParkourPenguin wrote:
No clue how it works in BL3, but in BL2 I'm pretty sure it was dynamically calculated at runtime based on the parts the weapon consists of.
If this holds true for BL3 as well, you can find and call the function that calculates the rarity. This might not be too bad if you know assembly.
Alternatively, find some cached value after the game calculates it. Might be easy or impractical.

If you really think it is a value, find several structures of weapons, put them in the structure dissector, group them together based on their rarity, and look for similarities/differences within/between groups.

Well THAT helps a lot already! Didn't know it was calculated!
Im sure the Devs left it as is from BL2, why invent anything new if the old system works, rite?

I've seen some Cheat Tables that had the adress to the weapon-components in them, but the AOBs were invalid so I couldn't look further into it.
So all I would need to do is to see what code accesses the components and I would be a lot farther into completing my mission as I'm now.

The problem is, that the adress to the components seems to be stored in the weapon-object, whereas I only seem to get the adress to the item-slot object. I don't really know how to get the weapon-object from the item slot :S

PS: I've been wondering what weapon-components really refer to, are these the several bonus options a weapon may have or something else entirely?
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 140

Joined: 06 Jul 2014
Posts: 4289

PostPosted: Thu May 21, 2020 2:27 pm    Post subject: Reply with quote

fakerlol wrote:
I don't really know how to get the weapon-object from the item slot :S
Look for pointers around there. Either in that structure or in other structures pointing to that one.

I'm not going to be of much help to you. I don't own the game and have no intentions of playing it. You'd have better luck looking up terms like "bl3 modded weapons" and looking at how other things work. e.g. there's several youtube videos showing a CE table with a "tooltip pointer" script that gets an address some other program uses to modify weapon data. Look at that address and see how it's important, or reverse engineer the other program and figure out what it does with that address.

fakerlol wrote:
PS: I've been wondering what weapon-components really refer to, are these the several bonus options a weapon may have or something else entirely?
Look up "BL2 gear calculator" or something. There's webpages that can show what I mean.
Maybe this google doc is relevant?

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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