Fusion/README.md
2023-11-12 19:15:18 +01:00

5.2 KiB

Fusion

a more unreal fuel than diesel

Collection of scripts to help port payday2 diesel maps to unreal engine

Overview

Needed software

PAYDAY 2 Model Tool PAYDAY-2-Hashlist DieselBundleViewer BeardLib-Editor Blender [Python]

pdworld2json.py

Converts world.continent files to the json format and fixes location rotation to work with unreal.

ConvertExportedToUnreal.blend

Fixes Model files exported by the PD2ModelParser, like removing unneeded objects rotating models propely and setting the origin corectly.

ExportModels.bat

Makes it easier to export models by just letting it run via a bat in the background

ModelCopyForBlender.bat

Makes it easier to set up a work folder for blender

Get started

Download the project files.

Download files by using Download ZIP

Extract the contents, make sure you have enough space for the game assets later. The extracted game assets are quite large.

Export Level data

Install DieselBundleViewer and open payday2s bundle_db.blb Open DieselBundleViewer

Open bundle_db.blb

Navigate to /levels/narratives and chose a map to port in my case First World Bank

Navigate to /levels/narratives/classics/red2

Then go in the world folder

Press Convert and Save as

Then save it on the /WorldFiles/DieselWorldCONTINENT

Get started with pdworld2json.py

Install python

Open a Powershell Terminal and write python3

It should open the windows store, hit install and let it finish installing python

After the install make sure if it is installed

You can also just install it a different way this is just the easiest.

Next install the requirements using requirements.txt

Open a Powershell Terminal in the Folder you extracted the project files.

Then use the command

pip install -r requirements.txt

Next run this command to convert the world.continent to a json

python .\pdworld2json.py

You should have a world.json like this

It should also have printed out what files you will need to export u will need to remember that

Export the needed assets from the game

Go back to Diesel Bundle Viewer and navigate to /units

Export the needed files Printed out by pdworld2json.py (In my case it is pd2_dlc_red, pd2_dlc_drive, pd2_dlc1, payday2, pd2_dlc_arena, pd2_dlc_eng, units, pd2_dlc2, vehicles, pd2_dlc_casino, lights, world, equipment, dev_tools, pd2_mcmansion)

Mark them Right Click and Press save as and save them in your project folder in a folder called "units"

Convert .model files in the unit folder and make them ready for blender

Make sure to download PAYDAY 2 Model Tool PAYDAY-2-Hashlist

Extract PD2ModelParser.exe like this

Next extract the hashlist in the root of the PD2ModelParser.exe this is very important or else the rest will not work

If all done right just open ExportModels.bat and it should export the models. It will take a bit for it to finish so sit back and relax.

You can also use this, it is faster, but i found if it encounters an error it will crash, and not export the rest, using the .bat makes if it encounters an error it will just continue.

.\PD2ModelParser.exe --batch-export=VALUE

After it finished, we need to sort the data for the next step, so open ModelCopyForBlender.bat

It should have created 2 more folders output and textures, and copied the data needed for blender.

Fixing the models using blender and a script

Now we should have a bunch of models with the .gltf inside output with the proper folder structure but they are not really usable in unreal.

So download Blender if you haven't already and open ConvertExportedToUnreal.blend.

If for some reason you cant open the .blend file anymore, you can just make a new project and load the blender_script.py.

If up to this point you have done everything correct you should be able to hit the run script button, and wait for it to finish. It will take a while depending of the amount of files you have.

When done it should have created a folder called "done" there you will find the models fixed and if you had the textures that where needed in the "texture" folder they should have applied the textures. (Sometimes Overkill uses textures outside dlc folder so there will be missing textures i will have to fix that)

Importing models into unreal

Importing map data

Profit???