• Guest, RaceDepartment is now on Discord!  Join Here

Problem using string objects when exported as .x files



I've been using BTB for a game I'm making and it's been working great until this problem popped up. For some reason string objects use textures differently than surfaces, terrain, regular objects, etc.

Here is how the textures are defined in those models:
Rural Australia\Textures\Ground\Grass\grass_E.dds

and here is how they are defined in string objects:
Great Britain (RBR)\Materials\Objects\Block04a_rw\mat0

Notice the lack of file extension. It should read:
Great Britain (RBR)\Materials\Objects\Block04a_rw\mat0.jpg
or so I think.

Without the extension my content importer cannot assign a content processor to the texture. Also the texture does not load when using DirectX Viewer in the DirectX SDK which leads me to believe it should have an extension.

I've tried editing the .x file to include the extension using a hex editor but any editing whatsoever of a .x file seems to corrupt it.

Any ideas?


I should've added that I tried that in my original post. Using DX text and then editing still produces a "Error 1 Could not read the X file. The file is corrupt or invalid. Error code: D3DXFERR_PARSEERROR."


Well, that's cool. I thought it might be a limitation of the .x format.

Follow RaceDepartment