Texture load error - inaccessible file (base game texture) [SOLVED]

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

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

Post Reply
user1679
Posts: 761
Joined: Fri, 20. Jul 18, 23:20

Texture load error - inaccessible file (base game texture) [SOLVED]

Post by user1679 » Sat, 3. Sep 22, 06:00

.
GO TO SOLUTION


I'm trying to use an icon for my aiscript and I looked at other scripts (such as tatertrader) to see how they're implemented.
My aiscript is "clf_repairship" and the order name is "CLF_RepairShip".

I opened the default game's "icons.xml" and copied the line:

<icon name="order_repair" texture="assets\fx\gui\textures\order\order_repair.tga" height="32" width="32"></icon>

into a DIFF and modified it as necessary:

Code: Select all

<diff>
    <add sel="/icons">
        <icon name="order_clf_repairship" texture="assets\fx\gui\textures\order\order_repair.tga" height="32" width="32"></icon>
    </add>
</diff>
But the debug log shows an error and I see a blue box in the map screen:

Texture load error: missing or inaccessible file 'assets\fx\gui\textures\order\order_repair'

I am running my mod from 'my documents' folder but that has not prevented other mods from working. Also,
I tried using a simple name for my order too: clfrepship but that also caused the error.
Last edited by user1679 on Sat, 3. Sep 22, 06:22, edited 1 time in total.

user1679
Posts: 761
Joined: Fri, 20. Jul 18, 23:20

Re: Texture load error - inaccessible file (base game texture)

Post by user1679 » Sat, 3. Sep 22, 06:21

.
SOLUTION

Here's how I solved this issue:

1. Extract 'order_repair.gz' from the base CAT file
2. Create the path in my mod's folder: assets\fx\gui\textures\order\
3. Extract 'order_repair' from the GZ file to the path in #2
4. Rename 'order_repair' to 'order_repair.dds' (the file header indicates it's not a TGA)
5. Change the path in my diff file:

<icon name="order_clf_repairship" texture="extensions\clf_repair_ship\assets\fx\gui\textures\order\order_repair.tga" height="32" width="32"></icon>

Post Reply

Return to “X4: Foundations - Scripts and Modding”