Page 4 of 7

Khan Noonien Singh

Posted: Mon May 22, 2023 7:19 pm
by runandhidegamer
Khan Noonien Singh has arrived in the mod prior to the events of Wrath of Khan.


Khan.png
Khan.png (615.92 KiB) Viewed 1500 times

Re: Star Trek Development - Latest news : The races are now being added to the mod

Posted: Wed May 24, 2023 4:09 pm
by frankycl
Looks great, imho :D (so, you managed to finaly edit the bundle-files, yes ? 8-) )

Please, keep on the marvelous work ! ;)

Re: Star Trek Development - Latest news : The races are now being added to the mod

Posted: Thu May 25, 2023 1:42 am
by runandhidegamer
frankycl wrote: Wed May 24, 2023 4:09 pm Looks great, imho :D (so, you managed to finaly edit the bundle-files, yes ? 8-) )

Please, keep on the marvelous work ! ;)

Yes with a lot of help from Tyler at the beginning I did manage to edit the bundle files, extract the texture i needed, modified them and then added them into a new bundle that my DW2 mod could access.

After Tyler went through the process with me for how to get the portraits for each texture, I then looked at how to do the same with flags. This used a different bundle and then I was getting errors trying to extract the textures from the new bundle.

It did not take long for me to work out how to extract the textures from the bundle and I actually learned a lot by doing it that way. Had a couple of days away from DW2 but my next step is to add in the flag textures for each race in my mod.

Deleted Post

Posted: Thu May 25, 2023 2:05 am
by runandhidegamer
<Post removed to add in correct order further down the page>

Deleted Post

Posted: Thu May 25, 2023 2:53 am
by runandhidegamer
<Post removed to add in correct order further down the page>

Deleted Post

Posted: Thu May 25, 2023 3:00 am
by runandhidegamer
<Post removed to add in correct order further down the page>

Deleted Post

Posted: Thu May 25, 2023 3:03 am
by runandhidegamer
<Post removed to add in correct order further down the page>

Deleted Post

Posted: Thu May 25, 2023 3:07 am
by runandhidegamer
<Post removed to add in correct order further down the page>

Deleted Post

Posted: Thu May 25, 2023 3:31 am
by runandhidegamer
<Post removed to add in correct order further down the page>

How To Extract The Files From The Bundle

Posted: Thu May 25, 2023 3:43 am
by runandhidegamer
So to start this little tutorial the first thing that I need to go through is how to extract the files from the bundle.

And this is how you do it.

So I know that the flags are found in a bundle called CoreContent.bundle
Which is in the folder C:\Program Files (x86)\Steam\steamapps\common\Distant Worlds 2\data\db\bundles\


So to look inside the bundle in that location I use the following command in the next post to list everything inside CoreContent.bundle

How To Extract The Files From The Bundle

Posted: Thu May 25, 2023 3:52 am
by runandhidegamer
When you run the list command as shown below this is what you get...... a lot of files and folders stored inside CoreContent.bundle.
And when you scroll down the page you will find the section in the bundle containing the flag files inside the folders UserInterface/Flags




dw2bt.exe list "C:\Program Files (x86)\Steam\steamapps\common\Distant Worlds 2\data\db\bundles\Human.bundle"



Extracting From Bundle Files #1.png
Extracting From Bundle Files #1.png (60.16 KiB) Viewed 1456 times

How To Extract The Files From The Bundle

Posted: Thu May 25, 2023 4:05 am
by runandhidegamer
Now comes the fun part...... how to extract the files from inside CoreContent.bundle specifically inside the folders UserInterface/Flags.

Because we are only interested in getting the textures for the flags and as you can see in the picture on the previous post, it specifically shows on the right of the picture that the files in UserInterface/Flags are Texture files.

Exactly what we want.

Now remember I am running the bundle tool DW2BT.exe from c:/temp so when I run the following command to extract the UserInterface/Flags folder from the bundle file, it will create the UserInterface/Flags folder in the folder I run DW2BT.exe from... in my case c:/Temp

So how to extract those files.

This is what you run and I make sure I add *.* on to the end so it extracts all files in that folder

In this screenshot below 61 files were extracted into my folder c:/temp/UserInterface/Flags

Now you have the 61 flag files you can convert them into dds files as shown above.


c:\Temp>dw2bt.exe extract "C:\Program Files (x86)\Steam\steamapps\common\Distant Worlds 2\data\db\bundles\CoreContent.bundle" UserInterface/Flags/*.*

Extracting From Bundle Files #2.png
Extracting From Bundle Files #2.png (13.84 KiB) Viewed 1454 times

How To Extract The Files From The Bundle

Posted: Thu May 25, 2023 4:09 am
by runandhidegamer
And this is what you will find after running the command in the prior post and you can see the 61 texture files in c:/temp/UserInterface/Flags.



Extracting From Bundle Files #3.png
Extracting From Bundle Files #3.png (72.8 KiB) Viewed 1452 times

How To Extract The Files From The Bundle

Posted: Thu May 25, 2023 4:35 am
by runandhidegamer
Post removed..... no longer required.

Where are the flags for each race?

Posted: Thu May 25, 2023 5:29 am
by runandhidegamer
So after extracting the textures of the flags for each race, I needed to ask myself.... Now what do i do?

I have the new Federation flag here as a dds file so how do I get that into DW2 and then get the Federation to show the flag?

To answer that first thing to do is understand where that flag is in the bundle file which in this case is the CoreContent.bundle file

The file structure for the flags is the the flag texture is in the following folders:

- UserInterface
- Flags

And inside the Flags folder is each of the 4 textures for each race.

Ok.... so I know where the textures go.

To create the Bundle file for the Federation flag I would specify the same path to the dds file:
Namely, the dds file is in this location in the bundle UserInterface/Flags.

Ok.... So I have created the new bundle for the Federation flag and have copied FederationFlag.bundle into mky mods folder as well as into "\common\Distant Worlds 2\data\db\bundles".

How to tell my mod to not use the Human_1 flag texture and instead use the FederationFlag texture?

Well DW2 is looking somewhere in my mod for the location of the flag texture and it does not take long to find it.

I opened up the Races_Federation.xml file and did a search for flag..... and it came up with the picture below.
Line 6 has this

<FlagFilename>UserInterface/Flags/Human_1</FlagFilename>

All I need to do in this file is change the texture file it is pointing to so it looks like this.

<FlagFilename>UserInterface/Flags/FederationFlag</FlagFilename>

Now when I run the mod in my game, it will look at the Federation Flag instead of the Human_1 flag.

You will also notice that there 5 additional Humam flags listed in the screenshot below... We will look at those later.




The Flags.png
The Flags.png (43.23 KiB) Viewed 1409 times

Where are the flags for each race?

Posted: Thu May 25, 2023 5:30 am
by runandhidegamer
So this is what I do.......

I had installed the bundle tool files from Tyler in C:/temp and I then added the CoreContent.bundle file here as well.

I extracted the files from the bundle file here into C:/temp which consisted of the following folders
The folder I wanted for flags was in the folder UserInterface stored inside the CoreContent.bundle file.

The following screenshot shows the folders inside the CoreContent.bundle file


The Flags #2.png
The Flags #2.png (6.61 KiB) Viewed 1408 times

Where are the flags for each race?

Posted: Thu May 25, 2023 5:31 am
by runandhidegamer
I then change to the directory c:/temp/UserInterface/Flags and then do a dir/w command to show a list all the flags there in dw2
As you can see the Human Flags 1 to 6 are in there.



The Flags #3.png
The Flags #3.png (33.23 KiB) Viewed 1407 times

Where are the flags for each race?

Posted: Thu May 25, 2023 5:33 am
by runandhidegamer
So now I am at the stage of converting each of the 6 Human flags into dds files which I can modify in paint.net.
To do this I do the following command as seen below.



c:\Temp>dw2bt convert "UserInterface\Flags\Human_1" "UserInterface\Flags\Human_1.dds"


The Flags #4.png
The Flags #4.png (19.78 KiB) Viewed 1406 times

Where are the flags for each race?

Posted: Thu May 25, 2023 5:34 am
by runandhidegamer
So now I can go into file explorer and have a look at the 6 DDS files I have just converted and which can now be edited in Paint.net.
I did make one mistake when creating the human dds file...... the file it was converted from started with a Capital H......
I converted the file to a DDS file starting with a small h.

Probably a good idea to keep the naming identical though it probably does not matter too much with what I am doing here.



The Flags #5.png
The Flags #5.png (217.84 KiB) Viewed 1404 times

Where are the flags for each race?

Posted: Thu May 25, 2023 5:35 am
by runandhidegamer
So what I can now do if I want to is to convert every flag in the UserInterface/Flags folder into a DDS file and then look at them in File Explorer as shown below. This has been a quick tutorial of how to extract files from a bundle and convert those files which are textures into DDs files you can modify.


The Flags #6.png
The Flags #6.png (327.98 KiB) Viewed 1403 times