Transferring a ship from one mod to another

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

BlackArchon
Posts: 1016
Joined: Wed, 4. Feb 04, 17:37
xr

Post by BlackArchon »

Thanks, I will try the X2 BOD Compiler first - it sounds promising for this problem.

Edit:
In the ZIP file with the Kha'ak Frigate is a bod file (M7_Rakshasa_scene.bod) and two PBB files (objects\ships\Cadius\Khaak). These files can be read by the Package Creator, can't they?
The BOD file in objects\ships\khaak\cockpits shouldn't be responsible for the missing textures.

After a look in the VFS from XRM with the help of X3 Editor 2, I couldn't find additional files in these folders which appear related to this M7 ship. Strange, I had hoped there were additional files to find...
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22434
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

the pbb files are the model files, these contain the texture links.

pbb are packed bob files. The creator can unpack them to bob, but cant then decompile them to bod.


to do it manually you will need to unpack them from the cat to bob files, then convert them to bod, then you can either pack them back into the mod files as pbd or bod files, or place them in the correct directory within the game. The creator should be able to find either when importing via vfs.
BlackArchon
Posts: 1016
Joined: Wed, 4. Feb 04, 17:37
xr

Post by BlackArchon »

With the help of the X3 Editor 2 and the X2 BOD Compiler I extracted and decompiled both of the PBB files to BOD (now hull.bod and storm.bod). Then I placed the BOD files into my XRM directory to "E:\XRM_LP_neu\objects\ships\Cadius\Khaak\M7_Rakshasa". I also use "E:\XRM_LP_neu" as the game directory in the Package Creator. When I now open it and choose "New, Import ship from VFS" to open the Kha'ak Frigate, it still shows the PBB files: http://i.imgur.com/ZIp78Qh.png

Shouldn't it show the BOD files now, because real files overwrite the cat/dat content?

Anyway, the resulting ZIP file when I export the ship is still the same as before the procedure.

What am I doing wrong here?
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22434
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

Which files did it add, as those are the ones that it will try to check in.

most likely it is favouring bob over bod files for models, so when there are both, it will pick the bob.

you could remove the bob files and replace them completly by bod.

i will look into cases where there are both and see if i can get it to add the bob files while being able to open the bod files to check inside
BlackArchon
Posts: 1016
Joined: Wed, 4. Feb 04, 17:37
xr

Post by BlackArchon »

The Package Creator still adds the PBB files: http://blubb.najut.org/lu/Khaak_Frigate.zip
It seems that it doesn't sees the extracted BOD files when opening the ship from VFS.

But my actual goal is that this Kha'ak Frigate has its correct appearance when transferring the ship to a new X3 mod.
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22434
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

it will see the files, but it will favour the bob/pbb files instead.

just like how it will favour pck files over xml/txt

i will look into changing it so it can check the files per level, so the bod files can overrwright the bob if they are on a higher level
BlackArchon
Posts: 1016
Joined: Wed, 4. Feb 04, 17:37
xr

Post by BlackArchon »

Cycrow wrote:sounds like its using custom textures and the creator isn't detecting those custom textures to extract this.

the most likely reason is that the mod files are in the compiled bob format, instead of the plain text bod format.

unfortunately the plugin manager doesn't currently support reading of the bob files so it cant detect textures from those models, those you will have to do manually.
Another option is to convert the model files in XRM from bod to bod so they can be analysed by the Creator

it is something i plan to implement at some point, but cant really say when that will be
Here you assumed that the Package Creator couldn't find all textures because of the PBB format. However, since I have them now extracted to BOD, it should be able to find all textures, shouldn't it? But the outcome ist he same, this Kha'ak frigate has missing textures and/or lighting effects. What else can I do?
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22434
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

the problem i believe is that because you now have both the pbb and bod files, the Creator is favouring the pbb over the bod files, so it still cant find the textures, because the pbb files are overriding the bod files (despite being on a lower level).

The creator will read form what ever files i has added to the package, so the pbb files appear in the package, those are the files it will try to read to find the textures.

im looking into ways of improving this
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22434
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

ok i've looked abit more into this.

The kha'ak frigate is using shaders rather than textures, which is why the creator cant extract them.

i will add shader support into the ship extraction
BlackArchon
Posts: 1016
Joined: Wed, 4. Feb 04, 17:37
xr

Post by BlackArchon »

Thank you very much! This sounds very promising. :)
Where are these shaders stored?
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22434
Joined: Sun, 14. Nov 04, 23:26
x4

Post by Cycrow »

ok i've found a few issues with the texture extraction and identifying the correct textures

this should be fixed in the next version

this was the result with the new creator
[ external image ]

This was just a straight auto extraction from XRM, didn't have to adjust anything
BlackArchon
Posts: 1016
Joined: Wed, 4. Feb 04, 17:37
xr

Post by BlackArchon »

Thanks, this does look way better! :)
Altough, something doesn't look right... but I'm not quite sure what exactly. I will report back when I had the chance to extract the ship myself.
BlackArchon
Posts: 1016
Joined: Wed, 4. Feb 04, 17:37
xr

Post by BlackArchon »

I've just exported the Kha'ak Frigate with the Package Creator V1.32. The ZIP file now doesn't contain the folder "objects\ships\Cadius\Khaak\M7_Rakshasa" with the two PBB files anymore. Then I remembered that I still got the two BOD files in my XRM directory - after deleting them, the Package Creator now sees quite some DDS files and exported it correctly to the ZIP file. And it worked! I have now correctly this ship in LU imported! Many thanks, Cycrow! :)

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”