Homebrew ROM Hack Homebrew app How to find the hidden value of an item in a game?

EmptySky72

Active Member
OP
Newcomer
Joined
Feb 1, 2022
Messages
25
Trophies
0
Age
24
Location
Earth
XP
120
Country
United States
So say for example im trying to find this specific item in a game I play, but it's just simply "specific item name" and there is no numbers or value that reference it that can be seen. Just simply the item.

I do know for a fact it has its own value though, im trying to find it so I can change it into a different item. Any idea how to do this?
 
Joined
Sep 9, 2019
Messages
904
Trophies
1
Location
Switch scene
Website
github.com
XP
2,663
Country
Korea, North
It depends on the game. Can you say which one it is? Slightly different situation since I was doing it on PC but when I was making my Black Ops trainer I was trying to find the weapon IDs of the guns. To do that I just bought a gun and used my intuition to guess that each gun has an integer ID, then I'd search ram for any ints that had changed, bought another gun, and repeat until I only had a few values that it could possible be. If you try that and you still have a bunch of potential addresses you can always do binary search by editing half of the values, checking if the item changed, if so discard the other half and repeat, if not discard the values you changed and do it again.
 
  • Like
Reactions: EmptySky72

EmptySky72

Active Member
OP
Newcomer
Joined
Feb 1, 2022
Messages
25
Trophies
0
Age
24
Location
Earth
XP
120
Country
United States
Its SAO Fatal Bullet, im trying to change the value of a certain item to the value of another item that is in the game but you cant get normally.

But the items dont have anything for reference to go off of, just their names so im kinda stuck. I guess there is no short way to find it out though :sad:
 
Joined
Sep 9, 2019
Messages
904
Trophies
1
Location
Switch scene
Website
github.com
XP
2,663
Country
Korea, North
Its SAO Fatal Bullet, im trying to change the value of a certain item to the value of another item that is in the game but you cant get normally.

But the items dont have anything for reference to go off of, just their names so im kinda stuck. I guess there is no short way to find it out though :sad:
The wikipedia page says it's on PC so there might be a cheat engine file containing all the item IDs somewhere online. Should be the same IDs on the Switch.
 
  • Like
Reactions: EmptySky72

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,375
Country
United Kingdom
There are two classical approaches to inventory in games, and some more modern stuff.

1) Everything is in a grid.
2) Identifiers.

Cheat searching starts much the same really. Get yourself infinite gold (or enough and buy cheap items).
Any item you like then buy and sell, or use a pick up, such that the usual has changed/has not changed/greater than/less than search picks it up ( https://web.archive.org/web/20080309104350/http://etk.scener.org/?op=tutorial ).

From that you will know at the least the location of an item in memory. 999 times of 1000 then everything will be bundled together for the purposes of managing memory. Try buying/selling a different item and looking at nearby memory, repeat a few times with different items.

It should then be obvious whether it is a grid (imagine a spreadsheet, each cell corresponds to a given item count) or an identifier (so you will have a count and identifier nearby). Now you can edit savestates or use cheats to try out other locations/identifiers, and in doing so hopefully find the one you want, possibly plus hidden things, cut content and DLC all without having to do the crazy epic sidequest or hope the random number generator falls in your favour (both of which tend to only give you the one item).

There are possibly clues as to which is which from gameplay (usually infinite inventory is grid, identifiers will lack it but that is not a hard rule). Both can be in a game -- if you have a separate panel for key items then... yeah. I have seen items separate from weapons before as well.

More modern stuff can be trickier. Here items will be generated and encoded such that items are more like a traditional character stats than an item. Can also be useful in keeping things small if you have multiple effects and don't need to put a 0 for all your different elemental damages and stats (maybe you have 50 of them in total).
You can still try to find the inventory location within memory and mess with things (pick things up and put down, sell and if there is a buyback then that, trade with other player...).
 
  • Like
Reactions: EmptySky72

Gamerjin

Well-Known Member
Member
Joined
May 25, 2016
Messages
2,812
Trophies
1
XP
6,517
Country
United States
this was how i found equipped weapon/armor:
1) make sure the weapon is equipped
2) do a u64 search, ==. [heap], 0x700000001
3) unequip the weapon
4) do a u64 search. ==. [heap]. 0x600000001

i believe this pointer works on bid 029C2837B0EEE8A9
[Inventory item 1 - item id]
580F0000 07D9C958
580F1000 00000050
580F1000 000000B0
580F1000 00000078
580F1000 00000000
580F1000 00000028
580F1000 00000090
780F0000 00000008 (next item is +0x98, instead of 0x8)
640F0000 00000000 XXXXXXXX
[this is the id of the item, you'll need either the cheat engine version table with the table, or the PC game to find out the ids.]
[and this is for normal inventory, not dlc abyss inventory]
 
  • Love
Reactions: EmptySky72

EmptySky72

Active Member
OP
Newcomer
Joined
Feb 1, 2022
Messages
25
Trophies
0
Age
24
Location
Earth
XP
120
Country
United States
this was how i found equipped weapon/armor:
1) make sure the weapon is equipped
2) do a u64 search, ==. [heap], 0x700000001
3) unequip the weapon
4) do a u64 search. ==. [heap]. 0x600000001
Does the hex value work the same for costume and accessories too or just for weapon?
 

Gamerjin

Well-Known Member
Member
Joined
May 25, 2016
Messages
2,812
Trophies
1
XP
6,517
Country
United States
Does the hex value work the same for costume and accessories too or just for weapon?
im not sure, i havent tried this method on costumes, only things you can equip, like weapon/armor/accessories. it work by using an equipped flag. its 6 when you found it( and its not new), but dont have it equipped, its 7 when you found it (, its not new), and its equipped.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=iIpfWORQWhU