Website/docs/md/tutorials/legacy/add_new_bundles.md
2020-11-29 18:08:36 +01:00

6.9 KiB

Warning


This tutorial has not been updated in a long time and may contain errors and incorrect informations.

Explanation

This tutorial is going to explain you how to add new bundles to the game, and make them useable for your new weapon/items or any kind of shit you want to add.

:::caution You need at least 0.12.7-R4 of SP-Tarkov in order to get this tutorial working. :::

Requirements

In order to edit weaons textures, you will need some specific softwares. The software you need are :

How to start ?

Well, first of all, we are going to create a specific mod for our work, i will call it Ereshkigal-TestMod-1.0.0. In this folder i will create another folder called db in wich i will add the folder res I'm going to add this mod as a separate weapon: https://mods.offline-tarkov.com/file/178-stickers-t-h-i-c-c-items-case/

  1. First step: Creating the mod directory path.

Well, it's a part of modding no one know yet, and we're going to explain it here. For a bundle mod, you need to have this following structure in your Blabl-modname-version/db/res/:

  • WeaponName(any kind of name, it's free to your choice)
    • manifet.json*
    • StreamingAssets
      • Windows
        • assets
          • content
            • From here goes to your bundle path.
              • Your bundle file.bundle

*The manifest.json file contain the new bundle path and his dependencies, for our tutorial and the mod exemple, the manifest.json looks like this: The dependencies of your bundle (if it's a original game copied bundle) can be found at: YourBundlepath/yourbundlename.manifest at the end of the file Dependencies:. Copy the path starting after Windows/ and add it in "dependencyKeys"

{
    "manifest": [
        {
            "key": "assets/content/items/containers/item_container_items_thicc/item_container_items_thicc_sticker.bundle",
            "dependencyKeys": [
                "assets/commonassets/physics/physicsmaterials.bundle",
                "cubemaps",
                "shaders"
            ]
        }
    ]
}

Now add into your mod.config.json this:

"res": {
		"bundles": {
			"ThiccItemSticker": {
				"manifest" : "res/bundles/ThiccItemSticker/manifest.json"
			}
		}
	}

:::note For avoiding any conflict, we are either renaming the bundle name, or changing his full path in the game directory by adding a folder like assets/content/items/containers/item_container_items_thicc/modded :::

  1. Step two : Changing the bundle CAB name.

Here comes the hard part. For this part we will need HxD Hex editor. Open the software and you will ends up on this page:

image

Click on File -> Open and select yourFile.bundle in your mod directory, for our exemple we will open item_container_items_thicc_sticker.bundle click "open". After doing it, this window should pop up :

image

You will have to ignore this part:

image

Now find in the text, a part that start like this: CAB-. For our exemple, it will be: CAB-b95e5ac0045a8d1817e666d364199d47. Now, go into search => replace screen.

image

In the search for box, paste the CAB-thingy name in it. For the replace with box, we will paste a new CAB name.

:::warning The CAB name must contain the same number of characters and numbers and the full length must not be different than the original. That means you can't switch a number to a character, or a number to a character. :::

For our exemple, we will replace it with this CAB name: CAB-p95e5aj0045g8d1817e666d364199d47. After pasting the new CAB name, hit "replace all" and confirm when it say "replacing X occurences"

Now you can save the file and close the software.

  1. Step three: Change the referencing bundle path.

For this step, we will use UABE(AssetBundleExtractor). So open the UABE software and you will end up on this screen:

image

We're going to open the new edited bundle file. Se we open item_container_items_thicc_sticker.bundle by going into File => Open

The screen now is this:

image

Click on the Info button and this screen will appear:

image

Now we will have to search to the line that contain a path to a bundlefile for which the Type Column have AssetBundle as result. Exemple:

image

Click on that path, and click on export dump button. It will prompt you to save a file in a directory, save it anywhere you want.

After saving the file, we are going to open it with NP++ or if the file doesn't open with NP++ Use VSCodium. After opening the file you will ends up with something like this:

image

The line we need to find is this one : 1 string m_Name = "assets/content/items/containers/item_container_items_thicc/item_container_items_thicc.bundle". We are going to change this path to the new file path. For our exemple, it will change to : 1 string m_Name = "assets/content/items/containers/item_container_items_thicc/item_container_items_thicc_sticker.bundle".

You can now save the file and go into UABE again. This time you will click on Import dump button and select the file we just edited.

After importing the file, you will have to press Ok button and it will prompt you if you want to save the file, press Yes. Now go into File -> Save and save the file in the same folder as your bundle file. Name it like you want we will rename it later.

You can now close UABE and go into your bundle folder, and delete the original bundle, rename the new bundle you just saved with the name you used for your mod with the bundle extension. So it should be renamed into: item_container_items_thicc_sticker.bundle.

  1. Step four: Adding the server items files.

Now we will add the required items files for being able to use your new item.

For this we need the following files to be created :

  • db/items/youritem.json
  • db/locales/yourlanguage/templates/youritem.json

These both files are enough to make the item working. But it wont be available anywhere. You will have to add it into a trader, or flea market, or any other kind of way you want to give this item. This wont be explained here on how to mod these files.

Thanks

  • Craink for introducing the code for custom bundles
  • 砂糖蜂蜜锡红茶 "Theresia" for the Hex editing and UABE part.
  • Ereshkigal for writing in english the tutorial

Guilded link: https://www.guilded.gg/senkospub