Help with a new mod

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

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

Post Reply
DeadAirRT
Posts: 1008
Joined: Fri, 25. Jan 19, 03:26
x4

Help with a new mod

Post by DeadAirRT » Wed, 6. Feb 19, 23:13

Background: I've been messing around with adding, moving, redirecting gates etc. So far no issues until I added my own new sector into the base universe. I have it in the game but I'm running into several issues. I'm just barely learning any of this so hopefully someone with a bit more knowledge can spot my error. I think I may need to change location of where the file is referenced since it is not patching but have no clue to be honest.

--The only error I am getting using debug is:
XLib::XMLInputOpenCallback(): Failed to open the file: assets/environments/cluster/cluster_da1

the file is referenced by index/components

CAT8/index/components.xml example:
index/<entry name="Cluster_06" value="assets\environments\cluster\Cluster_06"/>

my diff:
<diff xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<add sel="//index">
<entry name="Cluster_DA1" value="assets\environments\cluster\Cluster_DA1"/>
</add>
</diff>

I have Cluster_DA1.xml located in extensions/(modname)/assets/environments/cluster/

--This may or may not be causing my second issue. The sector can be entered, shows on map in correct position, but has no lighting/celestial/asteroids/nebulae
lighting/celestials should come from: extensions/(modname)/assets/environments/cluster/Cluster_DA1.xml
asteroids should come from : extensions/(modname)/libraries/region_definitions.xml
regions are created from: extensions/(modname)/maps/XU_ep2_universe/clusters/xml

Mysterial
Posts: 644
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Help with a new mod

Post by Mysterial » Wed, 6. Feb 19, 23:25

Paths in the files are relative to the game directory, not to your mod folder. You have to actually put the extension folder in there, i.e.

Code: Select all

<entry name="Cluster_DA1" value="extensions\mycoolmod\assets\environments\cluster\Cluster_DA1"/>

7ate9tin11s
Posts: 813
Joined: Fri, 11. Nov 05, 23:18
x4

Re: Help with a new mod

Post by 7ate9tin11s » Wed, 6. Feb 19, 23:28

DeadAirRT wrote:
Wed, 6. Feb 19, 23:13
...
XLib::XMLInputOpenCallback(): Failed to open the file: assets/environments/cluster/cluster_da1

...

CAT8/index/components.xml example:
index/<entry name="Cluster_06" value="assets\environments\cluster\Cluster_06"/>

...

I have Cluster_DA1.xml located in extensions/(modname)/assets/environments/cluster/
When I have added new component/macro files to the indexes I've alwaysed used the full relative path of the mod and it works, in components.xml try: <entry name="Cluster_06" value="extensions\(modname)\assets\environments\cluster\Cluster_06"/>

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Re: Help with a new mod

Post by UniTrader » Thu, 7. Feb 19, 00:07

yep, i can also confirm you are missing your extension folder from the path.

Also one more hint: always use lower case in your File Paths, for future Linux compatibility ;) :)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

DeadAirRT
Posts: 1008
Joined: Fri, 25. Jan 19, 03:26
x4

Re: Help with a new mod

Post by DeadAirRT » Thu, 7. Feb 19, 00:15

Thank you both very much! The sector has a sun and background now. Backed off using a custom name and stole an unused one from translations file so it has a name.

Now to work on asteroids/gas. No debug errors but nothing being spawned in system.

Edit: and now to change everything to lowercase because unitrader :rant:

DeadAirRT
Posts: 1008
Joined: Fri, 25. Jan 19, 03:26
x4

Re: Help with a new mod

Post by DeadAirRT » Thu, 7. Feb 19, 07:07

Ended up giving up on the asteroids/gas.

Uploaded to https://www.nexusmods.com/x4foundations/mods/285

BrummBear02
Posts: 308
Joined: Fri, 3. Oct 08, 20:43
x3ap

Re: Help with a new mod

Post by BrummBear02 » Thu, 7. Feb 19, 08:04

Try harder. I need this.
Gebt mir einen Spiegel dann schlage ich ihn mit seinem eigenen Gesicht

DeadAirRT
Posts: 1008
Joined: Fri, 25. Jan 19, 03:26
x4

Re: Help with a new mod

Post by DeadAirRT » Thu, 7. Feb 19, 17:35

BrummBear02 wrote:
Thu, 7. Feb 19, 08:04
Try harder. I need this.
A kind soul fixed the resource problem. 1.1 is no longer empty.

Post Reply

Return to “X4: Foundations - Scripts and Modding”