How to Create an Inventory Editor [Parasite Eve 2]

Post here (make sure thread doesn't exist first) any type of tutorials: text, images, videos or oriented discussions on specific games. No online-related discussions/posts OR warez!
Post Reply
User avatar
Warda
Cheater
Cheater
Posts: 28
Joined: Sun Dec 30, 2018 3:27 pm
Reputation: 12

How to Create an Inventory Editor [Parasite Eve 2]

Post by Warda »

How to create an Inventory Editor for Parasite Eve 2


Introduction:

So I've had a few messages in the past asking how I made the Parasite Eve 2 inventory editor, since users will tend to use different emulators or different versions of the one I use, and my table will more than likely not work for them. Also asking if it is easy to pull off - the short answer is yes, it's a quick and easy process and doesn't require any advanced knowledge of game hacking or using CE (I'm a novice myself). It is all done using simple scans and using the memory viewer. This tutorial will help you make a working inventory editor, but at certain points I will add (*) to explain why I did it which I will show at the bottom my thought processing.

These methods should work across any emulator and any game version. Some of these methods may also work in other games that have a slot-based inventory system too, though I would imagine more modern-day games will be a little harder.


Step 1: Finding the First Inventory Slot Address

Once you have attached Cheat Engine to your target process (the emulator you are using with the game loaded), go ahead an open up your inventory in game, and highlight slot 1 with an item inside it. In the example below, I'll be using the Tonfa Baton. I have provided a full list of all the items in the game, and their hex values to make your life easier at the bottom of this post, you can use these to scan for changes with exact values to make it faster to find things.

Image

Head back to Cheat Engine and change the value type to "Byte"(*) and tick the box labelled "Hex" next to the search box. Next, do a Next Scan for the value "92" (Hex value for Tonfa Baton).

At this point you are likely going to have a lot of results pop up.

Image

Now, we have to force this value to change, and to do so, we can head back into game and Move the Tonfa Baton to an empty Inventory slot, leaving the first item slot Empty.

Image

At this point, the value has now changed to "00" as there is nothing occupying this inventory slot. Now head to Cheat Engine and Next Scan for "0".

There will more than likely still be a large amount of values showing here.

Let's move the M93R into the first inventory slot, and then scan for "81" (M93R's Hex Value).

Image

We now have the address that stores the value for the first inventory slot. Double click this address from the results window to add it to your table.

You can do this for the other 20 inventory slots too using this method. However, there is a much faster way, and that is using the Memory Viewer.


Step 2: Finding the other Inventory Slot Addresses

Now that we have the first inventory slot address, we can easily find the others with a very quick and simple technique similar to how you found the values above. Only this time, we can use the Memory Viewer(*) to look for distinct patterns in the nearby memory addresses.

Firstly, right click the address you have just added to the table for the first inventory item slot, and "Browse this memory region" (Hotkey: CTRL+B).

Image

This will open up the Memory Viewer and take a look at the bottom section (ignoring all the assembly opcodes above), we are only focusing on the hex values in those memory addresses. Notice the address from the one you copied over to your table earlier, and the value inside it?

Image

Let's look even closer now at our inventory in the game and what are in each of the item slots. Can you spot the pattern emerging on the memory viewer? Take a look here: (Use the list of Item Hex values for this to make more sense)

Image

With this knowledge, we can simply move items around in our inventory to find all 20 inventory slots and confirm them with the memory viewer.

Once you are happy that you have found that specific address by seeing it on the memory viewer, you can right click where the value is and Add this address to the list, and this value will now be in your table.

Image

It's good practice to organise everything, so be sure to change the description of each slot you find so it's easier to identify later down the line. You can do this by highlighting the entry on your table, right click it, go to "Change Record" and "Description" (Hotkey: CTRL+M) to label them.

Image


Step 3: Finding the Amount of the Item in Each Slot

Okay, now with this, you can use the same method as mentioned in Section 1, only instead of looking for the item ID, you can search for the amount. A good way would be to use something like Ammo. So if you have 800 ammo in slot x, First Scan for "800", then move that ammo to another slot and Next Scan for "0". Move it back to the original slot and Next Scan for "800" again and so on until you find the right address. (Note: if scanning for a value above 255, you will need to change the "Value Type" to something higher, to search for "800" you can use 2-Bytes)

OR there is an even easier way. Again, lets take a closer look at the memory viewer.

Notice when we found the address for the item inventory slot, we found that each item slot was separated with 4-bytes each. Well, notice how there are values in the 3rd set of bytes in the memory viewer when there is an item in that slot in game? Here, take a closer look:

Image

As you can see from the screenshot above, the 3rd set of bytes after each item stores the amount of that item in the inventory. This is shown in Hex by default but you can right click the value in the Memory Viewer to change the display type if you wish.

As you did before when adding the inventory slots to your table, right click the 3rd set of bytes from the array and "Add this address to the list", and you can now change the amount for that specific item in that inventory slot.


Step 4: Creating a Drop Down Menu with Item Name instead of Hex value

Make sure you are using the more up to date versions of Cheat Engine V7.0+, as this now features a built in drop down menu that reads hex values and converts them to a string in your table.

Firstly, make sure the value in your table is converted to Hex. To do this, right click the entry for the Inventory Slot in your table, and select "Show as hexadecimal".

Image

Then, right click the inventory item slot address in your table and go to "Set/Change dropdown selection options" and a form will appear. In here, you can define what name corresponds to a certain value with the syntax - VV:Name - where V is Value.

Example: "AC:Buckshot" (without the quotes) "AC" is the hex value for Buckshot Ammo, and "Buckshot" is the name we are displaying whenever the table reads "AC" at that address.

Image

Feel free to copy and paste this list into the box if you wish, it has all the items in the game and their hex values already labelled.

Code: Select all

00:No Item
01:[Consumable] Recovery 1
02:[Consumable] Recovery 2
03:[Consumable] Recovery 3
04:[Consumable] Stim
05:[Consumable] Cola
06:[Consumable] MP Boost 1
07:[Consumable] MP Boost 2
08:[Consumable] Penicillin
3C:[Consumable] Protein Capsule
3D:[Consumable] Ringer's Solution
3E:[Consumable] Eau de Toilette
0F:[Consumable] Pyrokinesis Lv.1
10:[Consumable] Pyrokinesis Lv.2
11:[Consumable] Pyrokinesis Lv.3
12:[Consumable] Combustion Lv.1
13:[Consumable] Combustion Lv.2
14:[Consumable] Combustion Lv.3
15:[Consumable] Inferno Lv.1
16:[Consumable] Inferno Lv.2
17:[Consumable] Inferno Lv.3
18:[Consumable] Necrosis Lv.1
19:[Consumable] Necrosis Lv.2
1A:[Consumable] Necrosis Lv.3
1B:[Consumable] Plasma Lv.1
1C:[Consumable] Plasma Lv.2
1D:[Consumable] Plasma Lv.3
1E:[Consumable] Apobiosis Lv.1
1F:[Consumable] Apobiosis Lv.2
20:[Consumable] Apobiosis Lv.3
21:[Consumable] Metabolism Lv.1
22:[Consumable] Metabolism Lv.2
23:[Consumable] Metabolism Lv.3
24:[Consumable] Healing Lv.1
25:[Consumable] Healing Lv.2
26:[Consumable] Healing Lv.3
27:[Consumable] Lifedrain Lv.1
28:[Consumable] Lifedrain Lv.2
29:[Consumable] Lifedrain Lv.3
2A:[Consumable] Antibody Lv.1
2B:[Consumable] Antibody Lv.2
2C:[Consumable] Antibody Lv.3
2D:[Consumable] Energyshot Lv.1
2E:[Consumable] Energyshot Lv.2
2F:[Consumable] Energyshot Lv.3
30:[Consumable] Energyball Lv.1
31:[Consumable] Energyball Lv.2
32:[Consumable] Energyball Lv.3
0B:[Armour Attachment] Lipstick
0D:[Armour Attachment] Belt Pouch
0E:[Armour Attachment] MD Player
36:[Armour Attachment] Skull Crystal
37:[Armour Attachment] Medicine Wheel
38:[Armour Attachment] Holy Water
39:[Armour Attachment] Ofuda
3F:[Armour Attachment] Hunter Goggles
40:[Armour Attachment] GPS
09:[Weapon Attachment] SMG Clip Holder
0A:[Weapon Attachment] Rifle Clip Holder
0C:[Weapon Attachment] Snail Magazine
42:[Weapon Attachment] Hammer (M4A1 Attachment)
43:[Weapon Attachment] Pyke (M4A1 Attachment)
44:[Weapon Attachment] Javelin (M4A1 Attachment)
45:[Weapon Attachment] M203 (M4A1 Attachment)
46:[Weapon Attachment] M9 (M4A1 Attachment)
3A:[Tactical Equipment] Flare
3B:[Tactical Equipment] Pepper Spray
41:[Tactical Equipment] Combat Light
60:[Armour] Leather Jacket
61:[Armour] Tactical Armor
62:[Armour] Combat Armor
63:[Armour] Assault Suit
64:[Armour] PASGT Vest
65:[Armour] Tactical Vest
66:[Armour] EOD Suit
67:[Armour] Turtle Vest
68:[Armour] Chicken Plate
69:[Armour] NBC Suit
6A:[Armour] PsySuit
6B:[Armour] Aya Special
6C:[Armour] Shoulder Holster
6D:[Armour] Monk Robe
80:[Weapon] P08 (S. Magazine)
81:[Weapon] M93R
82:[Weapon] M950
83:[Weapon] P08
84:[Weapon] P229
88:[Weapon] Mongoose
8A:[Weapon] Grenade Pistol
8B:[Weapon] MM1
8C:[Weapon] PA3
8D:[Weapon] SP12
8E:[Weapon] AS12
8F:[Weapon] M4A1 Rifle
90:[Weapon] M249
92:[Weapon] Tonfa Baton
93:[Weapon] M4A1(+1)
94:[Weapon] M4A1(+2)
95:[Weapon] Hypervelocity
96:[Weapon] Gunblade
98:[Weapon] M4A1 Hammer
99:[Weapon] M4A1 Bayonet
9A:[Weapon] M4A1 Grenade
9B:[Weapon] M4A1 Pyke
9C:[Weapon] M4A1 Javelin
9D:[Weapon] MP5A5
9E:[Weapon] MP5A5(+1)
9F:[Weapon] MP5A5(+2)
A0:[Ammo] 9mm P.B.
A1:[Ammo] 9mm Hydra
A2:[Ammo] 9mm Spartan
A6:[Ammo] 44 Magnum
A7:[Ammo] 44 Maeda SP
A8:[Ammo] 44 Poison
A9:[Ammo] Grenade
AA:[Ammo] Airburst
AB:[Ammo] Riot
AC:[Ammo] Buckshot
AD:[Ammo] Firefly
AE:[Ammo] R.Slug
AF:[Ammo] 5.56 Rifle
B0:[Ammo] Paralizer
B1:[Ammo] Flashbomb
B5:[Ammo] Battery
B9:[Ammo] Battery
BB:[Ammo] Battery
BD:[Ammo] Fuel
BE:[Ammo] Battery
C1:[Key Item] Parthenon Key
C2:[Key Item] Micro Device
C3:[Key Item] Red Key
C4:[Key Item] Blue Key
C5:[Key Item] Armory Cardkey
C6:[Key Item] MIST Badge
C7:[Key Item] Mendel (Sept. issue)
C8:[Key Item] Clipboard
C9:[Key Item] MIST Search Warrant
CA:[Key Item] NMC Photo
CB:[Key Item] Manual
CC:[Key Item] Dryfield Map
CF:[Key Item] Motel Key No.6
D0:[Key Item] Saloon Key
D1:[Key Item] Monkey Wrench
D2:[Key Item] Lobby Key
D3:[Key Item] Bronco Masterkey
D4:[Key Item] Wire Rope
D5:[Key Item] Factory Key
D6:[Key Item] Rope Key
D7:[Key Item] Jerry Can
D8:[Key Item] Gasoline
D9:[Key Item] Ice Bag
DA:[Key Item] Bag of Water
DB:[Key Item] Bottlecap Magnet
DE:[Key Item] SUV Key
DF:[Key Item] Oak Board
E0:[Key Item] Jumper Plug
E1:[Key Item] Bowman's Card
E2:[Key Item] Yoshida's Card
E3:[Key Item] Electric Car Key
E4:[Key Item] Teddy Bear
E5:[Key Item] Pierce's Memo
E7:[Key Item] Aeris (Sept. issue)
E8:[Key Item] Mr. Douglas's Letter
EC:[Key Item] Jumper Plug
ED:[Key Item] Micro Device
EF:[Key Item] Pierce Rescue Bonus
F0:[Key Item] Soldier Rescue Bonus
Et voila! You have a working inventory editor. Have a play around and experiment a little - from doing this, I not only managed to find the inventory slot addresses, the Item IDs and the amounts, I also found the ammo type loaded into each weapon and the addresses that store where the item is on your armour slots too.

How did you know to scan for "value type" as Byte?
Spoiler
I took an educated guess really, knowing how old this game is and how it came out on the Playstation 1 - games back then were no where near the size they are today. With this in mind, I thought, since there are also a small number of items in the game, a "byte" can hold an unsigned value between 0-255, and I know there isn't 255 items in game. I would imagine back in those days, memory management was a big thing so it made most logical sense to search by "byte" for the small number of items in the game that there is.

In more modern games however, I would imagine they will likely be stored in 4-bytes, though this isn't always the case. A lot of the time you can just experiment with it and see what comes up. Having some knowledge of how games work behind the scenes helps a lot when you try to find certain values. Items will typically be stored in 1/2/4 bytes, whereas something like health or time for example will more than likely be stored as a float or a double.
Why the Memory Viewer? Why not just keep scanning for changes to find the addresses?
Spoiler
The Memory Viewer is an amazing tool that can be very useful in a lot of games you're hacking. You can often at times use the memory viewer to spot patterns in memory and they can save you a large amount of time instead of having to keep re-scanning. Obviously, this is not always the case, but in a lot of games you will see that a lot of functions are closely linked together. As an example, things like; Health, Stamina, Mana and XP in RNG style games will tend to be stored quite close together, and by using the memory viewer you can potentially find addresses significantly faster than repeat scanning.
How did you find the Item IDs in the first place?
Spoiler
Similar to how I found the inventory slot addresses, I scanned for changes in that particular item slot using one item, moving it out of that slot, scanning and repeating until I found the address for that inventory slot. I then tried moving different items into that slot to see what would change. Once I was certain that the value at that address was the item ID, I changed the value starting at 00, all the way until no more items would show up so I knew I had found all the items.
Full List of Items & their Hex IDs
Spoiler
------------
Consumables:
------------
01 - Recovery 1
02 - Recovery 2
03 - Recovery 3
04 - Stim
05 - Cola
06 - MP Boost 1
07 - MP Boost 2
08 - Penicillin
3C - Protein Capsule
3D - Ringer's Solution
3E - Eau de Toilette
0F - Pyrokinesis Lv.1
10 - Pyrokinesis Lv.2
11 - Pyrokinesis Lv.3
12 - Combustion Lv.1
13 - Combustion Lv.2
14 - Combustion Lv.3
15 - Inferno Lv.1
16 - Inferno Lv.2
17 - Inferno Lv.3
18 - Necrosis Lv.1
19 - Necrosis Lv.2
1A - Necrosis Lv.3
1B - Plasma Lv.1
1C - Plasma Lv.2
1D - Plasma Lv.3
1E - Apobiosis Lv.1
1F - Apobiosis Lv.2
20 - Apobiosis Lv.3
21 - Metabolism Lv.1
22 - Metabolism Lv.2
23 - Metabolism Lv.3
24 - Healing Lv.1
25 - Healing Lv.2
26 - Healing Lv.3
27 - Lifedrain Lv.1
28 - Lifedrain Lv.2
29 - Lifedrain Lv.3
2A - Antibody Lv.1
2B - Antibody Lv.2
2C - Antibody Lv.3
2D - Energyshot Lv.1
2E - Energyshot Lv.2
2F - Energyshot Lv.3
30 - Energyball Lv.1
31 - Energyball Lv.2
32 - Energyball Lv.3
-------------------
Armour Attachments:
-------------------
0B - Lipstick
0D - Belt Pouch
0E - MD Player
36 - Skull Crystal
37 - Medicine Wheel
38 - Holy Water
39 - Ofuda
3F - Hunter Goggles
40 - GPS
-------------------
Weapon Attachments:
-------------------
09 - SMG Clip Holder
0A - Rifle Clip Holder
0C - Snail Magazine
42 - Hammer (M4A1 Attachment)
43 - Pyke (M4A1 Attachment)
44 - Javelin (M4A1 Attachment)
45 - M203 (M4A1 Attachment)
46 - M9 (M4A1 Attachment)
-------------------
Tactical Equipment:
-------------------
3A - Flare
3B - Pepper Spray
41 - Combat Light
-------
Armour:
-------
61 - Tactical Armor
62 - Combat Armor
63 - Assault Suit
64 - PASGT Vest
65 - Tactical Vest
66 - EOD Suit
67 - Turtle Vest
68 - Chicken Plate
69 - NBC Suit
6A - PsySuit
6B - Aya Special
6C - Shoulder Holster
6D - Monk Robe
--------
Weapons:
--------
80 - P08 (S. Magazine)
81 - M93R
82 - M950
83 - P08
84 - P229
88 - Mongoose
8A - Grenade Pistol
8B - MM1
8C - PA3
8D - SP12
8E - AS12
8F - M4A1 Rifle
90 - M249
92 - Tonfa Baton
93 - M4A1(+1)
94 - M4A1(+2)
95 - Hypervelocity
96 - Gunblade
98 - M4A1 Hammer
99 - M4A1 Bayonet
9A - M4A1 Grenade
9B - M4A1 Pyke
9C - M4A1 Javelin
9D - MP5A5
9E - MP5A5(+1)
9F - MP5A5(+2)
-----
Ammo:
-----
A0 - 9mm P.B.
A1 - 9mm Hydra
A2 - 9mm Spartan
A6 - 44 Magnum
A7 - 44 Maeda SP
A8 - 44 Poison
A9 - Grenade
AA - Airburst
AB - Riot
AC - Buckshot
AD - Firefly
AE - R.Slug
AF - 5.56 Rifle
B0 - Paralizer
B1 - Flashbomb
B5 - Battery
B9 - Battery
BB - Battery
BD - Fuel
BE - Battery
----------
Key Items:
----------
C1 - Parthenon Key
C2 - Micro Device
C3 - Red Key
C4 - Blue Key
C5 - Armory Cardkey
C6 - MIST Badge
C7 - Mendel (Sept. issue)
C8 - Clipboard
C9 - MIST Search Warrant
CA - NMC Photo
CB - Manual
CC - Dryfield Map
CF - Motel Key No.6
D0 - Saloon Key
D1 - Monkey Wrench
D2 - Lobby Key
D3 - Bronco Masterkey
D4 - Wire Rope
D5 - Factory Key
D6 - Rope Key
D7 - Jerry Can
D8 - Gasoline
D9 - Ice Bag
DA - Bag of Water
DB - Bottlecap Magnet
DE - SUV Key
DF - Oak Board
E0 - Jumper Plug
E1 - Bowman's Card
E2 - Yoshida's Card
E3 - Electric Car Key
E4 - Teddy Bear
E5 - Pierce's Memo
E7 - Aeris (Sept. issue)
E8 - Mr. Douglas's Letter
EC - Jumper Plug
ED - Micro Device
EF - Pierce Rescue Bonus
F0 - Soldier Rescue Bonus

ameeelia
Cheater
Cheater
Posts: 35
Joined: Sat Oct 21, 2017 8:26 am
Reputation: 4

Re: How to Create an Inventory Editor [Parasite Eve 2]

Post by ameeelia »

Aah, Parasite eve, brings back some memories, have some rep :D

Post Reply

Who is online

Users browsing this forum: No registered users