Porting BHD Terrain to JO
Quote from 2DNED on January 21, 2022, 8:04 amPorting BHD Terrain to JO
You will need a few tools to get you going
JO Mod Tools
FwO Raven's PFF Extractor Tool
PhotoshopLet’s get started
Open FwO Raven's PFF Extractor, point it to your BHD Directory, look for the resource.pff file.
Now you should see a list of files packed into the .pff. On the bottom left side is a drop down box, click it and scroll down to TRN, click on it and the files will reload showing only the Terrain files.
Ok pick a terrain dvg1.TRN, right click Extract to Desktop.
Open the file with an editor or notepad if you don’t have one and you will see
polytrn_colormap dvg1_c.tga polytrn_detailmap det_grav.tga polytrn_polydata dvg1.cpt polytrn_tilestrip trntile10.tga polytrn_charmap dvg1_m.pcx polytrn_foliagemap dvg1_f.pcxYou will need to extract dvg1_c.tga, dvg1.cpt and dvg1_f.pcx using FwO Raven's PFF Extractor.
At this point you need to make a folder called Terrain and place the extracted files in to it.
Open dvg1_c.tga file in Photoshop and delete the Alpha Channel as it is not needed. Save the file as 24bit image, BHD uses 32 bit images and JO uses 24bit image.
Unzip your JO Mod Tools and look for DPTH2CDEP.exe
Open DPTH2CDEP and point it to your Terrain folder. Click Open and it will convert the .cpt file so it is now compatible with JO. You will notice you now have a new file in your Terrain folder called dvg1JO.cpt.
Delete the original dvg1.cpt and rename the dvg1JO.cpt file to dvg1.cptSo in our Terrain folder we have
Terrain\dvg1.cpt (Converted CPT)
Terrain\dvg1_c.tga (TGA in 24bit)
Terrain\dvg1_f.tgaNow we will grab a JO Terrain file and copy the BHD information in to it.
Open FwO Raven's PFF Extractor, point it to your JO Directory and look for the resource.pff file.
We will grab the Dvcx2.trn, extract it to your Desktop and open with your editor
terrain_name "Dvxc2" terrain_creator "Brophy" ;terrain values water_height 26 ;default, if zero will take from mission polytrn_colormap Dvxc2_c.tga polytrn_detailmap Det_d6.tga polytrn_detailmap_c1 Det_dg1.tga polytrn_detailmap_c2 Det_dsc5.tga polytrn_detailmap_c3 Det_mr2.tga polytrn_detailmap2 Det_d1d.tga polytrn_detailmapdist DetgrsD3.tga polytrn_polydata Dvxc2.cpt polytrn_tilestrip trntile10.tga polytrn_charmap Dvxc2_m.pcx polytrn_foliagemap Dvxc2_f.pcx polytrn_detailblendmap Dvxc2_d1.tga water_rgb 108,81,48 water_murk .3 polytrn_detaildensity 128 polytrn_detaildensity2 8 polytrn_sectorcount 8 ; width of sectors polytrn_wrapx 0 ; do we wrap on X? polytrn_wrapy 0 ; do we wrap on Y? polytrn_origin -4 -4 ; move terrain origin by this amount (X,Y) polytrn_sectors 4 4 1 0 0 0 3 4 ; width here must match above polytrn_sectors 4 4 1 0 0 0 3 4 polytrn_sectors 4 4 1 0 0 0 3 4 polytrn_sectors 4 4 1 0 2 0 3 4 polytrn_sectors 4 4 1 0 0 0 3 4 polytrn_sectors 4 4 1 0 0 0 3 4 polytrn_sectors 4 4 1 0 0 0 3 4 polytrn_sectors 4 4 1 0 0 0 3 4 lock_topleft 0 1 lock_topright 0 1 lock_bottomleft 1 1 lock_bottomright 1 1You will need to change some of the coding to suit.
terrain_name " dvg1" terrain_creator "Brophy ported by 2DNED" ;terrain values water_height 26 ;default, if zero will take from mission polytrn_colormap dvg1_c.tga polytrn_detailmap Det_d6.tga polytrn_detailmap_c1 Det_dg1.tga polytrn_detailmap_c2 Det_dsc5.tga polytrn_detailmap_c3 Det_mr2.tga polytrn_detailmap2 Det_d1d.tga polytrn_detailmapdist DetgrsD3.tga polytrn_polydata dvg1.cpt polytrn_tilestrip trntile10.tga polytrn_charmap Dvxc2_m.pcx polytrn_foliagemap dvg1_f.pcx polytrn_detailblendmap Dvxc2_d1.tga water_rgb 108,81,48 water_murk .3 polytrn_detaildensity 128 polytrn_detaildensity2 8 polytrn_sectorcount 8 ; width of sectors polytrn_wrapx 1 ; do we wrap on X? polytrn_wrapy 1 ; do we wrap on Y? polytrn_origin -4 -4 ; move terrain origin by this amount (X,Y) polytrn_sectors 1 3 1 3 1 3 1 3 ; width here must match above polytrn_sectors 2 4 2 4 2 4 2 4 polytrn_sectors 1 3 1 0 1 3 1 3 polytrn_sectors 2 4 2 4 2 4 2 4 polytrn_sectors 1 3 1 3 1 3 1 3 polytrn_sectors 2 4 2 4 2 4 2 4 polytrn_sectors 1 3 1 3 1 3 1 3 polytrn_sectors 2 4 2 4 2 4 2 4 lock_topleft 0 0 lock_topright 1 1 lock_bottomleft 0 0 lock_bottomright 1 1Once you have change the code, save and close the file. So now we are ready to try the terrain out. Copy the files in the Terrain folder in to your JO Directory Open you MedEditor and make a map, go play it.
Porting BHD Terrain to JO
You will need a few tools to get you going
JO Mod Tools
FwO Raven's PFF Extractor Tool
Photoshop
Let’s get started
Open FwO Raven's PFF Extractor, point it to your BHD Directory, look for the resource.pff file.
Now you should see a list of files packed into the .pff. On the bottom left side is a drop down box, click it and scroll down to TRN, click on it and the files will reload showing only the Terrain files.
Ok pick a terrain dvg1.TRN, right click Extract to Desktop.
Open the file with an editor or notepad if you don’t have one and you will see
polytrn_colormap dvg1_c.tga polytrn_detailmap det_grav.tga polytrn_polydata dvg1.cpt polytrn_tilestrip trntile10.tga polytrn_charmap dvg1_m.pcx polytrn_foliagemap dvg1_f.pcx
You will need to extract dvg1_c.tga, dvg1.cpt and dvg1_f.pcx using FwO Raven's PFF Extractor.
At this point you need to make a folder called Terrain and place the extracted files in to it.
Open dvg1_c.tga file in Photoshop and delete the Alpha Channel as it is not needed. Save the file as 24bit image, BHD uses 32 bit images and JO uses 24bit image.
Unzip your JO Mod Tools and look for DPTH2CDEP.exe
Open DPTH2CDEP and point it to your Terrain folder. Click Open and it will convert the .cpt file so it is now compatible with JO. You will notice you now have a new file in your Terrain folder called dvg1JO.cpt.
Delete the original dvg1.cpt and rename the dvg1JO.cpt file to dvg1.cpt
So in our Terrain folder we have
Terrain\dvg1.cpt (Converted CPT)
Terrain\dvg1_c.tga (TGA in 24bit)
Terrain\dvg1_f.tga
Now we will grab a JO Terrain file and copy the BHD information in to it.
Open FwO Raven's PFF Extractor, point it to your JO Directory and look for the resource.pff file.
We will grab the Dvcx2.trn, extract it to your Desktop and open with your editor
terrain_name "Dvxc2" terrain_creator "Brophy" ;terrain values water_height 26 ;default, if zero will take from mission polytrn_colormap Dvxc2_c.tga polytrn_detailmap Det_d6.tga polytrn_detailmap_c1 Det_dg1.tga polytrn_detailmap_c2 Det_dsc5.tga polytrn_detailmap_c3 Det_mr2.tga polytrn_detailmap2 Det_d1d.tga polytrn_detailmapdist DetgrsD3.tga polytrn_polydata Dvxc2.cpt polytrn_tilestrip trntile10.tga polytrn_charmap Dvxc2_m.pcx polytrn_foliagemap Dvxc2_f.pcx polytrn_detailblendmap Dvxc2_d1.tga water_rgb 108,81,48 water_murk .3 polytrn_detaildensity 128 polytrn_detaildensity2 8 polytrn_sectorcount 8 ; width of sectors polytrn_wrapx 0 ; do we wrap on X? polytrn_wrapy 0 ; do we wrap on Y? polytrn_origin -4 -4 ; move terrain origin by this amount (X,Y) polytrn_sectors 4 4 1 0 0 0 3 4 ; width here must match above polytrn_sectors 4 4 1 0 0 0 3 4 polytrn_sectors 4 4 1 0 0 0 3 4 polytrn_sectors 4 4 1 0 2 0 3 4 polytrn_sectors 4 4 1 0 0 0 3 4 polytrn_sectors 4 4 1 0 0 0 3 4 polytrn_sectors 4 4 1 0 0 0 3 4 polytrn_sectors 4 4 1 0 0 0 3 4 lock_topleft 0 1 lock_topright 0 1 lock_bottomleft 1 1 lock_bottomright 1 1
You will need to change some of the coding to suit.
terrain_name " dvg1" terrain_creator "Brophy ported by 2DNED" ;terrain values water_height 26 ;default, if zero will take from mission polytrn_colormap dvg1_c.tga polytrn_detailmap Det_d6.tga polytrn_detailmap_c1 Det_dg1.tga polytrn_detailmap_c2 Det_dsc5.tga polytrn_detailmap_c3 Det_mr2.tga polytrn_detailmap2 Det_d1d.tga polytrn_detailmapdist DetgrsD3.tga polytrn_polydata dvg1.cpt polytrn_tilestrip trntile10.tga polytrn_charmap Dvxc2_m.pcx polytrn_foliagemap dvg1_f.pcx polytrn_detailblendmap Dvxc2_d1.tga water_rgb 108,81,48 water_murk .3 polytrn_detaildensity 128 polytrn_detaildensity2 8 polytrn_sectorcount 8 ; width of sectors polytrn_wrapx 1 ; do we wrap on X? polytrn_wrapy 1 ; do we wrap on Y? polytrn_origin -4 -4 ; move terrain origin by this amount (X,Y) polytrn_sectors 1 3 1 3 1 3 1 3 ; width here must match above polytrn_sectors 2 4 2 4 2 4 2 4 polytrn_sectors 1 3 1 0 1 3 1 3 polytrn_sectors 2 4 2 4 2 4 2 4 polytrn_sectors 1 3 1 3 1 3 1 3 polytrn_sectors 2 4 2 4 2 4 2 4 polytrn_sectors 1 3 1 3 1 3 1 3 polytrn_sectors 2 4 2 4 2 4 2 4 lock_topleft 0 0 lock_topright 1 1 lock_bottomleft 0 0 lock_bottomright 1 1
Once you have change the code, save and close the file. So now we are ready to try the terrain out. Copy the files in the Terrain folder in to your JO Directory Open you MedEditor and make a map, go play it.