Bug fixes and Writing the README.md
102
README.md
@ -5,11 +5,11 @@
|
|||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
### Needed software
|
### Needed software
|
||||||
[PAYDAY 2 Model Tool](https://github.com/kythyria/payday2-model-tool)
|
[PAYDAY 2 Model Tool](https://github.com/kythyria/payday2-model-tool/releases)
|
||||||
[PAYDAY-2-Hashlist](https://github.com/Luffyyy/PAYDAY-2-Hashlist)
|
[PAYDAY-2-Hashlist](https://github.com/Luffyyy/PAYDAY-2-Hashlist)
|
||||||
[DieselBundleViewer](https://github.com/Luffyyy/DieselBundleViewer)
|
[DieselBundleViewer](https://github.com/Luffyyy/DieselBundleViewer)
|
||||||
[BeardLib-Editor](https://github.com/Luffyyy/BeardLib-Editor)
|
[BeardLib-Editor](https://github.com/Luffyyy/BeardLib-Editor)
|
||||||
[Blender](https://github.com/kythyria/payday2-model-tool)
|
[Blender](https://www.blender.org/)
|
||||||
[Python]
|
[Python]
|
||||||
|
|
||||||
### pdworld2json.py
|
### pdworld2json.py
|
||||||
@ -25,3 +25,101 @@ Makes it easier to export models by just letting it run via a bat in the backgro
|
|||||||
Makes it easier to set up a work folder for blender
|
Makes it easier to set up a work folder for blender
|
||||||
|
|
||||||
## Get started
|
## Get started
|
||||||
|
|
||||||
|
### Download the project files.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
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](https://github.com/Luffyyy/DieselBundleViewer) and open payday2s bundle_db.blb
|
||||||
|
|
||||||
|

|
||||||
|

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

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Get started with pdworld2json.py
|
||||||
|
|
||||||
|
Install python
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
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
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
**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](https://github.com/kythyria/payday2-model-tool/releases) [PAYDAY-2-Hashlist](https://github.com/Luffyyy/PAYDAY-2-Hashlist)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
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](https://www.blender.org/) 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.
|
||||||
|

|
12464
WorldFiles/DieselWorldCONTINENT/FirstWorldTest.continent
Normal file
57810
WorldFiles/UnrealJSON/FirstWorldTest.json
Normal file
BIN
assets/images/B1.png
Normal file
After Width: | Height: | Size: 279 KiB |
BIN
assets/images/B2.png
Normal file
After Width: | Height: | Size: 373 KiB |
BIN
assets/images/DBV1.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
assets/images/DBV2.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
assets/images/DBV3.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
assets/images/DBV4.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
assets/images/DBV5.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
assets/images/DBV6.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
assets/images/DWL1.png
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
assets/images/EXPF1.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
assets/images/EXPF2.png
Normal file
After Width: | Height: | Size: 113 KiB |
BIN
assets/images/IP31.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
assets/images/IP32.png
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
assets/images/IP33.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
assets/images/PDWJ1.png
Normal file
After Width: | Height: | Size: 107 KiB |
BIN
assets/images/PDWJ2.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
assets/images/PDWJ3.png
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
assets/images/PDWJ4.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
assets/images/TMF1.png
Normal file
After Width: | Height: | Size: 82 KiB |
BIN
assets/images/TMF2.png
Normal file
After Width: | Height: | Size: 88 KiB |
@ -3,13 +3,13 @@ import os
|
|||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
# Display print() in the blender console window for debuging
|
# Display print() in the blender console window for debuging
|
||||||
def print(data):
|
#def print(data):
|
||||||
for window in bpy.context.window_manager.windows:
|
# for window in bpy.context.window_manager.windows:
|
||||||
screen = window.screen
|
# screen = window.screen
|
||||||
for area in screen.areas:
|
# for area in screen.areas:
|
||||||
if area.type == 'CONSOLE':
|
# if area.type == 'CONSOLE':
|
||||||
override = {'window': window, 'screen': screen, 'area': area}
|
# override = {'window': window, 'screen': screen, 'area': area}
|
||||||
bpy.ops.console.scrollback_append(override, text=str(data), type="OUTPUT")
|
# bpy.ops.console.scrollback_append(override, text=str(data), type="OUTPUT")
|
||||||
|
|
||||||
for material in bpy.data.materials:
|
for material in bpy.data.materials:
|
||||||
bpy.data.materials.remove(material, do_unlink=True)
|
bpy.data.materials.remove(material, do_unlink=True)
|
||||||
|