[HowTo] Modding: Extracting, Editing Ammo and Camera...
Oct 1, 2022 0:08:47 GMT 10
Haunted and thesorrow like this
Post by Scott Kennedy on Oct 1, 2022 0:08:47 GMT 10
◆ What is this?
Hi, I'm SK and I present to you HowTo. The idea of this thread is to gather tutorials referring to mods I've already made, as a way to help other people understand how certain mods are made.
Tools:
REtool
re2_pak_names_release.list
1) To extract the files from re_chunk_000.pak, we'll need REtool.exe, extract-pak.bat and re2_pak_names_release.list
-----
1a) Put the three files in the RE2 installation directory. It's usually in "Program Files (x86)\Steam\steamapps\common\RESIDENT EVIL 2 BIOHAZARD RE2"
-----
1b) Now, just drag re_chunk_000.pak to extract-pak.bat
TIP: You can edit the re2_pak_names_release.list to include just the file you want, so you don't have to extract the entire game. In our case, the file we want is "_masters.scn.19", so we just leave "1320962148 natives/x64/objectroot/scene/system/_masters.scn.19" save and extract.
WARNING: When dealing with any file other than .mesh or .tex, it is always good to extract the latest file to avoid incompatibility and crash, therefore "_masters.scn.19" will be extracted from re_chunk_000.pak.patch_004 as it was the last time the file has been updated. To know this, just try to extract from each latest patch until it is actually extracted from one of them.
It's also important to mention that you have to uninstall your mods, because if any of them use a file that you want to extract, that file will not be extracted.
REtool
re2_pak_names_release.list
1) To extract the files from re_chunk_000.pak, we'll need REtool.exe, extract-pak.bat and re2_pak_names_release.list
-----
1a) Put the three files in the RE2 installation directory. It's usually in "Program Files (x86)\Steam\steamapps\common\RESIDENT EVIL 2 BIOHAZARD RE2"
-----
1b) Now, just drag re_chunk_000.pak to extract-pak.bat
TIP: You can edit the re2_pak_names_release.list to include just the file you want, so you don't have to extract the entire game. In our case, the file we want is "_masters.scn.19", so we just leave "1320962148 natives/x64/objectroot/scene/system/_masters.scn.19" save and extract.
WARNING: When dealing with any file other than .mesh or .tex, it is always good to extract the latest file to avoid incompatibility and crash, therefore "_masters.scn.19" will be extracted from re_chunk_000.pak.patch_004 as it was the last time the file has been updated. To know this, just try to extract from each latest patch until it is actually extracted from one of them.
It's also important to mention that you have to uninstall your mods, because if any of them use a file that you want to extract, that file will not be extracted.
◆ Using 010Editor to make Infinite Ammo (Reloadable)
Tools:
010Editor (it's paid but has a 30 day trial)
RE RSZ Template
1) To edit files like .scn and .pfb we need RE RSZ Template, which should be used with 010Editor, follow alphaz's instructions for installation in their GitHub.
-----
2) Open _masters.scn.19 in 010Editor and wait for it to fully load.
TIP: Check "Game Version" in alphaz's thread to avoid problems opening files in 010Editor.
-----
3) In Template Results (I), let's go down to app.ropeway.WeaponBulletUserData[92] (II), then Data (III), then List(Object)*_LoadingPartsCombos[1] (IV)
From List(Object)_LoadingPartsCombos[0] to List(Object)_LoadingPartsCombos[41] are the sections referring to each weapon and its upgrades, including unlockable weapons.
-----
3a) Let's use List(Object)_LoadingPartsCombos[0] as an example. Open according to the image.
-----
3b) The sections to be edited here give us two options: Infinite Non-Reloadable Ammo and Infinite Reloadable Ammo. Change the following sections to the values described below, according to the option you want, whether it's reloadable or not.
Bool_Infinity[3] -> True
Guid_InfinityVariable[4] -> 00000000-0000-0000-0000-000000000000
Guid_AlwaysReloadable[6] -> 00000000-0000-0000-0000-000000000000
TIP: There is no exact way to know which weapon is which, but it's possible to rely on Int_Number[7] which indicates the amount of ammo of the weapon.
List(Object)_LoadingPartsCombos[20] is Anti-Tank (from Ada)
List(Object)_LoadingPartsCombos[21] is Minigun (before G4)
List(Object)_LoadingPartsCombos[22] to [28] seems to be the Grenades
List(Object)_LoadingPartsCombos[37] is ATM-4
List(Object)_LoadingPartsCombos[38] is Infinite Minigun
WARNING: For some reason, Grenades when made as infinite are not possible to place in the Item Box, but can be discarded from the Inventory. The Breakable Knife when made as infinite is not recoverable when used as a Defensive Item.
010Editor (it's paid but has a 30 day trial)
RE RSZ Template
1) To edit files like .scn and .pfb we need RE RSZ Template, which should be used with 010Editor, follow alphaz's instructions for installation in their GitHub.
-----
2) Open _masters.scn.19 in 010Editor and wait for it to fully load.
TIP: Check "Game Version" in alphaz's thread to avoid problems opening files in 010Editor.
-----
3) In Template Results (I), let's go down to app.ropeway.WeaponBulletUserData[92] (II), then Data (III), then List(Object)*_LoadingPartsCombos[1] (IV)
From List(Object)_LoadingPartsCombos[0] to List(Object)_LoadingPartsCombos[41] are the sections referring to each weapon and its upgrades, including unlockable weapons.
-----
3a) Let's use List(Object)_LoadingPartsCombos[0] as an example. Open according to the image.
-----
3b) The sections to be edited here give us two options: Infinite Non-Reloadable Ammo and Infinite Reloadable Ammo. Change the following sections to the values described below, according to the option you want, whether it's reloadable or not.
- For Infinite Non-Reloadable Ammo:
Bool_Infinity[3] -> True
Guid_InfinityVariable[4] -> 00000000-0000-0000-0000-000000000000
- For Infinite Reloadable Ammo
Guid_AlwaysReloadable[6] -> 00000000-0000-0000-0000-000000000000
TIP: There is no exact way to know which weapon is which, but it's possible to rely on Int_Number[7] which indicates the amount of ammo of the weapon.
- Some weapons I've identified:
List(Object)_LoadingPartsCombos[20] is Anti-Tank (from Ada)
List(Object)_LoadingPartsCombos[21] is Minigun (before G4)
List(Object)_LoadingPartsCombos[22] to [28] seems to be the Grenades
List(Object)_LoadingPartsCombos[37] is ATM-4
List(Object)_LoadingPartsCombos[38] is Infinite Minigun
WARNING: For some reason, Grenades when made as infinite are not possible to place in the Item Box, but can be discarded from the Inventory. The Breakable Knife when made as infinite is not recoverable when used as a Defensive Item.
◆ Using 010Editor to make Improved Camera
Tools:
010Editor (it's paid but has a 30 day trial)
RE RSZ Template
1) To edit files like .scn and .pfb we need RE RSZ Template, which should be used with 010Editor, follow alphaz's instructions for installation in their GitHub.
-----
2) pl0000.pfb.16 is the file responsible for different Leon settings, including the camera. Open it in 010Editor and wait for it to fully load.
-----
3) In Template Results (I), let's go down to app.ropeway.camera.userdata.PlayerCameraTransitionParamUserData[12] (II). Camera settings are divided into several categories, from [12] to [42], which you can view by the names in Value (III). Normal is for when Leon is walking; Jog when running; Damage are for different types of damage, note that Grab from Zombies and Lickers are not included here; Hold is for when aiming and has categories for each specific weapon, and those that don't have their own are controlled by HoldDefault; Gimmick are interactions with the environment, such as move the shelf.
-----
4) Let's use app.ropeway.camera.userdata.PlayerCameraTransitionParamUserData[12] as an example. Open according to the image.
-----
4a) Here we have four very important sections, they are: Vec3_Offset[6], Vec3_AvoidOffset[8], Float_FieldOfView[10] and Float_GazeDistance[16]. They all have very similar functions that produce very different results, I recommend testing each of them separately to better understand how they work. Vec3_Offset[6] has float X, which the higher the value, the more to left Leon will be; float Y, which the higher the value, the more the camera will go up. Float_FieldOfView[10], as the name suggests, it controls the game's FOV, but I don't recommend changing its value too much beyond the default because it can leave the image distorted on the sides. Float_GazeDistance[16], the higher the value, the farther the camera will be.
-----
4b) Now what you need to do is test each section listed in "4a" until you get the desired result. For this, I recommend doing it first only in Normal and when you have your values defined, copy and paste in the other sections.
TIP: To identify weapons, I recommend using the RE2 - Ultimate File List
WARNING: RPD's Main Hall is not affected by this camera changes, the game seems to have some configuration somewhere else that forces the camera to be very close to the player when not aiming in that area.
010Editor (it's paid but has a 30 day trial)
RE RSZ Template
1) To edit files like .scn and .pfb we need RE RSZ Template, which should be used with 010Editor, follow alphaz's instructions for installation in their GitHub.
-----
2) pl0000.pfb.16 is the file responsible for different Leon settings, including the camera. Open it in 010Editor and wait for it to fully load.
-----
3) In Template Results (I), let's go down to app.ropeway.camera.userdata.PlayerCameraTransitionParamUserData[12] (II). Camera settings are divided into several categories, from [12] to [42], which you can view by the names in Value (III). Normal is for when Leon is walking; Jog when running; Damage are for different types of damage, note that Grab from Zombies and Lickers are not included here; Hold is for when aiming and has categories for each specific weapon, and those that don't have their own are controlled by HoldDefault; Gimmick are interactions with the environment, such as move the shelf.
-----
4) Let's use app.ropeway.camera.userdata.PlayerCameraTransitionParamUserData[12] as an example. Open according to the image.
-----
4a) Here we have four very important sections, they are: Vec3_Offset[6], Vec3_AvoidOffset[8], Float_FieldOfView[10] and Float_GazeDistance[16]. They all have very similar functions that produce very different results, I recommend testing each of them separately to better understand how they work. Vec3_Offset[6] has float X, which the higher the value, the more to left Leon will be; float Y, which the higher the value, the more the camera will go up. Float_FieldOfView[10], as the name suggests, it controls the game's FOV, but I don't recommend changing its value too much beyond the default because it can leave the image distorted on the sides. Float_GazeDistance[16], the higher the value, the farther the camera will be.
-----
4b) Now what you need to do is test each section listed in "4a" until you get the desired result. For this, I recommend doing it first only in Normal and when you have your values defined, copy and paste in the other sections.
TIP: To identify weapons, I recommend using the RE2 - Ultimate File List
WARNING: RPD's Main Hall is not affected by this camera changes, the game seems to have some configuration somewhere else that forces the camera to be very close to the player when not aiming in that area.
◆ Finishing and Using Mods
Tools:
Fluffy's Mod Manager
1) To use mods in RE2 you need Fluffy's ModManager. Download and extract somewhere easily accessible.
-----
2) Now you can put your Mod in .rar or use the folder with the file. Remember that the Mod must be in the same folder structure that it was extracted from. If you prefer to put it in .rar, make sure that inside the .rar file there is no folder before "natives". If you prefer to keep it only as a folder, it should be like this: "[folder with Mod's name]\natives\x64..."
-----
3) Put your mod in "ModManager\Games\RE2R\Mods"
-----
4) Install your mod using Fluffy's ModManager.
Fluffy's Mod Manager
1) To use mods in RE2 you need Fluffy's ModManager. Download and extract somewhere easily accessible.
-----
2) Now you can put your Mod in .rar or use the folder with the file. Remember that the Mod must be in the same folder structure that it was extracted from. If you prefer to put it in .rar, make sure that inside the .rar file there is no folder before "natives". If you prefer to keep it only as a folder, it should be like this: "[folder with Mod's name]\natives\x64..."
-----
3) Put your mod in "ModManager\Games\RE2R\Mods"
-----
4) Install your mod using Fluffy's ModManager.
◆ Thanks to:
- FluffyQuack for REtool and Mod Manager.
- alphaz for RE RSZ Template.
- JTeghius Kittius and Everyone who contributed with RE2 - Ultimate File List.
- Everyone from ModdingHaven Discord with their findings and tutorials.