How to create a new RE Asset Library - Havens-Night/REEngine-Modding-Documentation GitHub Wiki

Table of Contents

1. Creating the Library

2. Extracting Files

3. Rendering Thumbnails

4. Labeling Assets

5. Automating Asset Labeling

6. Packaging

7. Creating a Diff (Optional)

Requirements

To start, make sure you're using Blender 4.3.2 and the latest versions of RE Asset Library (and other RE Addons).

Blender 4.3.2 specifically is recommended because newer versions tend to crash while rendering. (As of writing this at least.)

[!NOTE] If you only want to edit an existing asset library, see steps 4,5 and 7.

1. Creating the Library

Go to the RE Asset Library addon preferences. (Edit > Preferences > Addons > RE Asset Library)

Click Create New RE Asset Library. Choose which game you want to make it for.

Download the list file for your game if you don't already have it. You can see lists for most games by clicking the "Download List Files" button.

Then browse to the list file you downloaded and press OK.

Wait for set up to finish and the new window to close, then proceed to the next step.

2. Extracting Files

Press the Open RE Asset Library Folder button in the addon preferences and navigate to the newly created folder for your game.

Open the REAssetLibrary_XXX.blend file, make sure that you're using Blender 4.3.2 to open it.

In the top right in the RE Asset tab (press N if you don't see it), press Set Game Extract Paths.

[!NOTE] You wont see the RE Asset tab unless you have the REAssetLibrary_XXX blend file open.

Pick the .exe file for your game. It's recommended to change the Extract Path to something like C:\EXTRACT so that file paths don't become too long and fail to extract.

Make sure that wherever you're extracting to will have enough space to unpack all files and press OK. (Roughly double the size of the installed game is required)

Next, click the Extract Game Files button. Leave all options at default and click Extract.

Depending if you're on an HDD or SSD, it may take a while. Just wait until it finishes and the window goes away.

3. Rendering Thumbnails

Once everything finishes extracting, click Render RE Asset Thumbnails. This may take a long time (around 5-20 minutes) depending on how many assets there are.

[!NOTE] If you close Blender or it crashes, you can click the Render Thumbnails button again and it'll pick up from where ever it left off.

Once it finishing rendering, press the Fetch RE Asset Thumbnails button and press OK. This again will take a while, Blender is slow at assigning thumbnails.

Finally once that's done, save the blend file with File > Save.

Additionally you may want to clear the RE Mesh Editor texture cache folder.

All textures need to be converted to .dds to be usable by Blender and therefore take additional space.

You can use the Clear Texture Cache button in the RE Mesh Editor addon preferences to clear them.

4. Labeling Assets

Now time for the "fun" part. Labeling everything.

Expand the asset browser window in the bottom right of the asset blend file.

First I'll show the manual way of labeling files.

Press N with an asset selected to bring up the asset property panel. You can set the name here, as well as tags to make an asset searchable by other names.

To create new categories, press the + icon and double click to rename them.

You can assign an asset to a category by clicking and dragging it onto the category.

Be sure to save the blend file often as you make changes, as Blender can be unstable sometimes when assigning assets.

Also, be sure to use the "Save Changes To Catalog" button before attempting any scripting in the next section.

[!NOTE] You can view the path to a file by hovering over it or by pressing the Open Asset Location button.

5. Automating Asset Labeling

There's nothing stopping you from labeling everything manually, however the use of scripting can make it easier to label many assets at once.

First off, before doing anything here, press the Save Changes To Catalog button (shown above).

This will prevent you from losing any changes you manually entered.

Now open up the asset library folder where the blend file is located. You can also press the Open Library Folder button in the RE Asset tab to get there.

Now create a copy of REAssetCatalog_XXX.tsv by selecting it and pressing CTRL + C and then CTRL + V.

This will serve as a backup you can revert to in case you break things.

If you're proficient at Excel or Google Sheets, you can open the Asset Catalog TSV files to make changes that way. Just be sure to set the separator type as Tabs when you import and save/download as .tsv when done.

However, I'm not going to cover making changes that way here. Instead I'll be covering scripting changes to the asset catalog via Python.

There's many ways you can do this, you can even do it directly in Blender's text editor. Though I wouldn't recommend that since you can easily undo and lose big parts of your script by mistake.

Install Python if you don't already have it installed. Make sure to check the box that mentions adding to PATH when installing.

The RE Asset Library Collection repo on GitHub has some example scripts that can be used for reference. Click Code > Download Zip.

Extract the downloaded zip file where ever you want.

Open the ExtraUtils\Scripts folder. These are scripts I used to make the other asset libraries.

To be entirely honest, they're very janky and cobbled together to get things done quickly.

For that reason, I've made an example script that's a bit easier to follow.

Start by creating a copy of the EXAMPLEGAME folder (CTRL C + V) and renaming it to whatever the name of your asset library is.

Open the new folder and rename the EXMPL part of the generateCatalogOverrides file to whatever your asset library is.

Now open the renamed catalogOverrides_XXX.py file in Notepad++ or any other text editor.

I've put comments in the file to hopefully explain everything going on.

Start by changing the file paths near the top of the file to where your new asset library is.

Next, scroll down to the category list. This assigns assets under certain paths to certain categories.

Add as many entries as you want here to categorize assets. These are categories I used for RE3.

That's all I'm going to cover in this guide in terms of scripting. You can use your brain or look at the other examples to figure out how to do more advanced things.

Now save the file. Hold shift and right click an empty space in File Explorer and choose Open Powershell Window here.

In the terminal that opens, type cmd and press enter.

Then type ge and press tab to autocomplete the rest of the file name then press enter.

If you did everything correctly, the script should run and say "Generated new catalog:...".

Now you can either edit the output path in the script at the top to replace the original catalog file or you can just manually delete the original and rename the edited one.

After replacing the REAssetCatalog_XXX.tsv file, go back into Blender and press the Reload RE Asset Catalog File button.

If your directory paths were set correctly in the script, you should now see your new categories added.

Continue to add categories to the script and repeat until the Unassigned category is almost empty.

6. Packaging

Once you've got everything labeled and you're satisfied, you can create an installable package by using the Package RE Asset Library button.

This will create a .reassetlib file which you can share. Please submit it to me as an issue on the asset library collection GitHub (or any other way) if you would like them added to the addon.

7. Creating a Diff (Optional)

If you're editing an existing asset library already available on the repo, you can log whatever changes you make compared to the original using the "Generate Library Diff" button.

This will generate a file containing all changes which you can send to me as an issue on GitHub.