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 


Help: Finding Loot Quantity

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

Joined: 16 Jun 2016
Posts: 2

PostPosted: Thu Jun 16, 2016 8:54 pm    Post subject: Help: Finding Loot Quantity Reply with quote

I am looking for a way to identify the loot DROP quantity (or DROP quality) code in a game. Is there a good way to identify this?

For example, simple things like stats/money/items(in inventory) I can just raise or lower and see how that value changes, but I have no idea how to do this with drops.

Ideally I would be able to increase the loot drop rate by 5x or the loot quality by 5x. This brings me more enjoyment from a game and doesn't leave it feeling broken to me (less grind, more fun) so I would greatly appreciate if anyone could help me learn to identify these values.

Current game I am playing is Grim Dawn, but would like to know how to do this in general as well.

Thank you for your help and I apologize if I posted this in the wrong section!


Last edited by gfeldman on Thu Jun 16, 2016 9:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Thu Jun 16, 2016 8:59 pm    Post subject: Reply with quote

Find the quantity for your inventory stack.
Find out what accesses that address when picking up loot.
Multiply that value by 5.
Back to top
View user's profile Send private message
gfeldman
How do I cheat?
Reputation: 0

Joined: 16 Jun 2016
Posts: 2

PostPosted: Thu Jun 16, 2016 9:41 pm    Post subject: Reply with quote

Zanzer wrote:
Find the quantity for your inventory stack.
Find out what accesses that address when picking up loot.
Multiply that value by 5.


Sorry, I updated original post to highlight that I would like to increase the DROP quantity (monster dies, 2 different items drop vs monster dies, 20 different items drop) and not the number of items that I already have. Or is that what you had answered? I will give it a try.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Thu Jun 16, 2016 9:46 pm    Post subject: Reply with quote

Well, you won't get 20 different items.

My approach was just that when you pick up an item, you multiply that quantity.

So instead of picking up the 1 stick that dropped. It adds 20 sticks to your inventory.

Quite a bit more complicated to find a unit's loot table and drop chances.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Jun 16, 2016 11:37 pm    Post subject: Reply with quote

Just do as Zanzer originally said, except backtrace to find the call that gets executed when loot drops and just write a script so that that call gets executed multiple times. That might even get you random items.
Back to top
View user's profile Send private message
cooleko
Grandmaster Cheater
Reputation: 11

Joined: 04 May 2016
Posts: 717

PostPosted: Fri Jun 17, 2016 9:37 am    Post subject: Reply with quote

Both of the provided explanations work:

Zanzer: very easy to implement, only have to find the address of the inventory item that monster most frequently drops, once you have that address, see what accesses when the monster's drops are added to the inventory. why accesses instead of writes? Most likely, the game is going to manage the inventory like this:
Code:
(for integer):
  Mov register, [inventory item count] (ACCESSES)
  add register, [drop count] (what you want to edit)
  mov [inventory item count], register (WRITES)
(for float):
  .. code that determines item drop amount and places it into FP stack ..
  fld dword ptr [inventory item count]
  fadd st(0), st(1)
  fstp dword ptr [inventory item count]

Of course, these are merely examples, actual implementation can vary wildly. To simply make the game "less grindy" you can find the ADD, FADD, inc, or w/e code causes the addition, and duplicate it to take up five lines of code (if it is FADDP, dont include the P until the last line)
Now you have 5x the drops from the enemy.

++Methos: Oh so much fun, but requires much more effort. As he mentions, odds are you will increase your chance for rare loot if you duplicate the right function call as the game will call the random loot generation function several more times. You need to start in very much the same manner as Zanzer: find your inventory item address, see what accesses it, once you find the instruction that accesses it, Break and trace that instruction. Follow the trace to the first "ret", double click the next line of code to go there in the memory viewer, and scroll up one line (will be a call instruction). Duplicate the prep lines before the call and the call itself, if the game crashes, you didnt get all the prep instructions. If you only got duplicates of one item or some other unintended result, then we need to go another function call deeper by following the original trace to the second "ret", and looking at its function call. Rinse and repeat until you find the "monster is dead, generate and distribute loot" function call.
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 Discussions 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