Solving problem with expected attribute "texcoord" at element "texture"

The place to discuss scripting and game modifications for X4: Foundations.

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

aurumgallente
Posts: 124
Joined: Sun, 14. Jun 20, 14:45
x4

Solving problem with expected attribute "texcoord" at element "texture"

Post by aurumgallente »

Many modders have a problem with converter when it doesn't want to convert our .dae files into banch of .xmf. It throws error

Code: Select all

expected attribute "texcoord" at element "texture"
and without any explanation. It is not a problem of converter, it is a problem of Blender itself. Open second instance of Blender and try to import our problematic .dae file. Blender will refuse, so we need to do Window -> Toggle system console. Here we can find more detailed information, for example, it could be

Code: Select all

schema validation (error): error: error required attribute missing element: texture, attribute: texcoord
Also it shows line of code where problem is. To fix it we need to open our .dae file with text editor (I use Notepad++) and find that string. In my case it looked like this

Code: Select all

<texture texture="generic_p1_hulltexture_01_diff_dds-sampler"/>
As we can see there is no attribute "textcoord" here. We need to add this attribute

Code: Select all

<texture texture="generic_p1_hulltexture_01_diff_dds-sampler" texcoord="meshId20-tex0"/>
Now we need to try to convert our file again. I had only 1 problematic line in my file but there could be more of them so repeat this process to the bitter end.
BrummBear02
Posts: 310
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: Solving problem with expected attribute "texcoord" at element "texture"

Post by BrummBear02 »

Or you could simply select uv maps when exporting the .dae and avoid the error in the first place. At least that's how it works in 2.7x. Blender 2.8 is a different story.
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht
aurumgallente
Posts: 124
Joined: Sun, 14. Jun 20, 14:45
x4

Re: Solving problem with expected attribute "texcoord" at element "texture"

Post by aurumgallente »

If you work in Blender 2.8 it is possible that Blender 2.7 will refuse to open .blend file and it will refuse to open .dae file because it has errors. In this situation you are stuck with Blender 2.8. I didn't try to play with .fbx or other formats but I wrote the fastest way to prepare .dae file to converting.

Return to “X4: Foundations - Scripts and Modding”