Add new crafting recipes + change item types (EXE Editing)
Aug 9, 2021 22:46:22 GMT 10
DeⓧiaZ, 3getu841, and 4 more like this
Post by kTeo on Aug 9, 2021 22:46:22 GMT 10
Hey guys, been a while since my last tutorial here.
This time we will talk about a way to edit the values for combining items, so we can make new recipes or add new scopes/silencers to weapons.
Be aware that we will need to overwrite an existing recipe, so try to replace something you will not use in your project.
This time we will talk about a way to edit the values for combining items, so we can make new recipes or add new scopes/silencers to weapons.
Be aware that we will need to overwrite an existing recipe, so try to replace something you will not use in your project.
This tutorial uses HxD screenshots for reference. If you're new to hex editing, i recommend you to don't use other hex editor programs for better understanding.
Our bytes begin in the offset 721EC8
Once there, you will begin to see IDs for the items in a sequence. You can find a full item ID list in THIS TUTORIAL.
ALL combinations will have 3 items: two items that get combined, and the item that comes out from it. (example: green herb + red herb = mixed herbs g+r)
Below is a screenshot showcasing the first entry on that list
By converting this sequence to item IDs, we get: Handgun, Silencer, Handgun w/ Silencer. Those 6 bytes are responsible for writing the Handgun w/ Silencer recipe.
And following it down you will find recipes for all the weapons, herbs, treasures and keys. All of them being 6 bytes long with 3 items in a sequence.
As i have said above, you can only replace existing recipes. I would recommend to replace recipes for adding scopes or stocks for weapons, since for me at least i never use those. replacing entries for certain combineable treasures also seems like a good idea, specially if that said treasure won't appear in your project.
BUT there is one little problem on this. AMMUNITIONS AND EXPLOSIVES CANNOT BE COMBINED.
For fixing this, we will need to change their item types to something else. Oftern when i need those, i can change them for healing items.
There's a specific byte inside the same array as the stacking quantity that tells the game what type of item it is. To understand how to find this, check my AMMO STACKING TUTORIAL
example using chicago typewriter ammo:
40 02 02 32 64 00 8B
The highlighted byte above is the item type, 02 stands for AMMO.
You can find this byte on any other array on my tutorial list by going back 2 bytes from the highlighted stacking amount. (64 00 for the array above)
here's a list i've made with all the possible bytes:
00 - Healing? (same as the "healing" with exception that it can be equipped and they also appear at the keys menu)
01 - Guns (can equip and examine, combine does not work, stacking does not work, uses bullets and has weapon status)
02 - Ammo (can examine, combine does not work, can stack. appears at the attache case inventory)
03 - Grenades (can equip and stack, can't combine)
04 - Keys (can examine and combine, appears at the key menu)
05 - Treasures (can examine and combine, can stack and appears in the treasures menu)
06 - Healings (can use, can combine, can only stack by the TAKE prompt)
additional notes:
nothing happens if you try to USE an item with 06 that isn't normally a healing item.
below are some images showing examples of what happens when we change those bytes:
Here's what i've made using this method for one of my projects: a new gunpowder crafting system!
What i did there was i replaced all entries that combined yellow herbs into crafting recipes of two items: Chicago Typewriter Ammo and Handcannon Ammo. So i effectively added new crafting items without compromising my gameplay, since this project would use a different aproach to HP upgrades.
Once there, you will begin to see IDs for the items in a sequence. You can find a full item ID list in THIS TUTORIAL.
ALL combinations will have 3 items: two items that get combined, and the item that comes out from it. (example: green herb + red herb = mixed herbs g+r)
Below is a screenshot showcasing the first entry on that list
By converting this sequence to item IDs, we get: Handgun, Silencer, Handgun w/ Silencer. Those 6 bytes are responsible for writing the Handgun w/ Silencer recipe.
And following it down you will find recipes for all the weapons, herbs, treasures and keys. All of them being 6 bytes long with 3 items in a sequence.
As i have said above, you can only replace existing recipes. I would recommend to replace recipes for adding scopes or stocks for weapons, since for me at least i never use those. replacing entries for certain combineable treasures also seems like a good idea, specially if that said treasure won't appear in your project.
BUT there is one little problem on this. AMMUNITIONS AND EXPLOSIVES CANNOT BE COMBINED.
For fixing this, we will need to change their item types to something else. Oftern when i need those, i can change them for healing items.
There's a specific byte inside the same array as the stacking quantity that tells the game what type of item it is. To understand how to find this, check my AMMO STACKING TUTORIAL
example using chicago typewriter ammo:
40 02 02 32 64 00 8B
The highlighted byte above is the item type, 02 stands for AMMO.
You can find this byte on any other array on my tutorial list by going back 2 bytes from the highlighted stacking amount. (64 00 for the array above)
here's a list i've made with all the possible bytes:
00 - Healing? (same as the "healing" with exception that it can be equipped and they also appear at the keys menu)
01 - Guns (can equip and examine, combine does not work, stacking does not work, uses bullets and has weapon status)
02 - Ammo (can examine, combine does not work, can stack. appears at the attache case inventory)
03 - Grenades (can equip and stack, can't combine)
04 - Keys (can examine and combine, appears at the key menu)
05 - Treasures (can examine and combine, can stack and appears in the treasures menu)
06 - Healings (can use, can combine, can only stack by the TAKE prompt)
additional notes:
nothing happens if you try to USE an item with 06 that isn't normally a healing item.
below are some images showing examples of what happens when we change those bytes:
Here's what i've made using this method for one of my projects: a new gunpowder crafting system!
What i did there was i replaced all entries that combined yellow herbs into crafting recipes of two items: Chicago Typewriter Ammo and Handcannon Ammo. So i effectively added new crafting items without compromising my gameplay, since this project would use a different aproach to HP upgrades.