[INFO] Workaround for mods not loading in Win7

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

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

Vectorial1024
Posts: 304
Joined: Mon, 30. Jul 18, 04:16
x4

[INFO] Workaround for mods not loading in Win7

Post by Vectorial1024 »

When I was developing my mod Civilian Fleets, I noticed that people from Windows 7 (Win7) are complaining that the mod caused the game to not start at all. (Note: the mod at that time was not uploaded to Steam, only available at Nexus)

While I originally thought it could be related to Win7 not able to load UI scripts properly, with the help of some volunteers, it was found that the mod could not be loaded even when the mod has been reduced to just the content.xml with nothing else.

The content.xml when it crashes the game would look like this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<content name="V1024 - Civilian Fleets" id="v1024_civilian_fleets" author="Vectorial1024" version="112" date="2019-08-06" save="0" description="Create civilian fleets to help manage traders and miners.">
</content>
The workaround is to add the many "optional" translations to the file to make it look like this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<content name="V1024 - Civilian Fleets" id="v1024_civilian_fleets" author="Vectorial1024" version="202" date="2019-08-06" save="0" description="Create civilian fleets to help manage traders and miners.">
    <!-- "Extra" language entries as implicitly required by X4. This is quite different from what I've seen in XR. -->
    <text language="7" name="V1024 - Civilian Fleets" description="Create civilian fleets to help manage traders and miners." author="Vectorial1024" />
    <text language="33" name="V1024 - Civilian Fleets" description="Create civilian fleets to help manage traders and miners." author="Vectorial1024" />
    <text language="34" name="V1024 - Civilian Fleets" description="Create civilian fleets to help manage traders and miners." author="Vectorial1024" />
    <text language="39" name="V1024 - Civilian Fleets" description="Create civilian fleets to help manage traders and miners." author="Vectorial1024" />
    <text language="44" name="V1024 - Civilian Fleets" description="Create civilian fleets to help manage traders and miners." author="Vectorial1024" />
    <text language="49" name="V1024 - Civilian Fleets" description="Create civilian fleets to help manage traders and miners." author="Vectorial1024" />
    <text language="55" name="V1024 - Civilian Fleets" description="Create civilian fleets to help manage traders and miners." author="Vectorial1024" />
    <text language="81" name="V1024 - Civilian Fleets" description="Create civilian fleets to help manage traders and miners." author="Vectorial1024" />
    <text language="82" name="V1024 - Civilian Fleets" description="Create civilian fleets to help manage traders and miners." author="Vectorial1024" />
    <text language="86" name="V1024 - Civilian Fleets" description="Create civilian fleets to help manage traders and miners." author="Vectorial1024" />
    <text language="88" name="V1024 - Civilian Fleets" description="Create civilian fleets to help manage traders and miners." author="Vectorial1024" />
</content>
It is quite surprising, because according to this (https://steamcommunity.com/sharedfiles/ ... =245117855), the "optional" translations (they call it "optional localisation") should really be optional; I take it as "not having those translations will not affect the game or the mod, and that the mod can still be loaded with no problems".

Hope someone may find this useful.
The future awaits.

X4 Foundations mods:
Civilian Fleets: (Obsolete for X4 7.0+) Managing your civilian ships has never been easier.
Station Logistics: Managing your station networks has never been easier.
Market Discovery: Find Black Market Traders; also rerolls them.
Logistics Optimization: Improve your station traders; improve your trade stations!

Return to “X4: Foundations - Scripts and Modding”