Problem with simple mod

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

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

Enkidou Zahard
Posts: 8
Joined: Sun, 26. Dec 21, 14:21
x3ap

Problem with simple mod

Post by Enkidou Zahard »

Hey
I have problem with basic mod to incrase cargo of some split ships
<?xml version="1.0" encoding="utf-8"?>
<diff>
<replace sel="/macros/macro/properties/cargo/@max">25000</replace>
</diff>
Mod looks like that but my ship walues arent changing . What am i doing wrong ?
User avatar
chew-ie
Posts: 6598
Joined: Mon, 5. May 08, 00:05
x4

Re: Problem with simple mod

Post by chew-ie »

Without having worked with the X4 scripting language [yet] I can only offer some logical advice here:
If the markup shown by you is the "whole mod" I'd miss the "which ship" declaration. (you mentioned that you only want to modify a certain Split ship). If this information is usually encoded in the "sel" attribute of that replace-node then I'd recommend to check if the path exists / is valid. (if there isn't another node attribute to specify the ship[type] id I'd guess that the ship has to be part of the path)

Image

Spoiler
Show
BurnIt: Boron and leaks don't go well together...
Königinnenreich von Boron: Sprich mit deinem Flossenführer
Nila Ti: Folgt mir, ihr Kavalkade von neugierigen Kreaturen!
Tammancktall: Es ist eine Ehre für sie mich kennenzulernen...
CBJ: Thanks for the savegame. We will add it to our "crazy saves" collection [..]

:idea: Feature request: paint jobs on custom starts
Enkidou Zahard
Posts: 8
Joined: Sun, 26. Dec 21, 14:21
x3ap

Re: Problem with simple mod

Post by Enkidou Zahard »

umm im not sure i rly understood ur post but i placed the mod in same patch that i saw in different mod incrasing cargo space which is extensions/modname/assets/units/size_m
Keep in mind im simple man trying to tweak my own game the top of my moding skill was modyfing some eu games in notepad ;) i even got files of ships extracted by some helpfull guy on discord
sprIder
Posts: 135
Joined: Sat, 3. Jul 10, 23:23
x4

Re: Problem with simple mod

Post by sprIder »

Hello and welcome to the forum.
Your macro looks good so far and should work.
It could be that the macro is in the wrong folder and/or has been named incorrectly.

The macros for the cargo holds of the split ships are in
X4 Foundations\extensions\ego_dlc_split\assets\props\storagemodules\macros.
If you want to change one of these macros with a mod, you have to write a macro with the same name, stored in a path similar to the game. So the path must be:
extensions\modname\extensions\ego_dlc_split\assets\props\storagemodules\macros

If you now want to change e.g. the cargo-macro of the M-transporter, you need a macro with the name storage_spl_m_trans_container_01_a_macro.xml. And in this macro you can insert exactly your code.
But then you change the cargo hold for all (new?) split M freighters / Boa in the game.

Be aware that the paths do not necessarily apply to the other races.
For the Terrans, for example, some are in extensions\ego_dlc_terran\assets\props\storagemodules\macros, others are in the ship macro folder, e.g.
extensions\ego_dlc_terran\assets\units\size_l\macros or
extensions\ego_dlc_terran\assets\units\size_m\macros.

So it could help you to unpack the whole game: Getting Started
Enkidou Zahard
Posts: 8
Joined: Sun, 26. Dec 21, 14:21
x3ap

Re: Problem with simple mod

Post by Enkidou Zahard »

Thanks !!! it works now!! looks like the problem was patch to the macro in extension folder ;)

Return to “X4: Foundations - Scripts and Modding”