Need Help with Modding SPL M Neutron Gatling Mk2

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

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

novaford4
Posts: 2
Joined: Fri, 23. Aug 24, 10:28

Need Help with Modding SPL M Neutron Gatling Mk2

Post by novaford4 »

Hi everyone,

I’m trying to create a simple mod for X4: Foundations that modifies the SPL M Neutron Gatling Mk2. The goal of my mod is to:

1. Remove the heat generation (set it to `0`).
2. Increase the weapon’s damage (e.g., from `43` to `100`).

I’ve managed to remove the heat generation successfully by editing the `.dat` file like this:

Code: Select all

<diff>
 <replace sel="/macros/macro/properties/heat/@value">0</replace>
</diff>
This works perfectly, and the weapon no longer heats up. However, I’m having trouble increasing the damage. Here’s what I’ve tried:

I added the following line to the same `.dat` file to modify the damage:

Code: Select all

<diff>
<replace sel="/macros/macro/properties/damage/@value">100</replace>>
</diff>
Unfortunately, this doesn’t seem to work, and the weapon’s damage remains unchanged in the game.

The mod is structured correctly as far as I can tell, and the game is recognizing the mod since the heat modification works.
I’ve double-checked the path to the `damage` attribute in the original XML file, and it seems correct.
I’ve also tried using separate `<diff>` elements and even isolated the damage change on its own, but nothing seems to affect the damage value.

Questions:
Is there something wrong with the XML path I’m using for the damage attribute?
Could there be another factor or conflict preventing this change from taking effect?
Are there any other approaches I should try to successfully increase the damage?

I’d really appreciate any guidance or suggestions. Thanks in advance for your help!
sprIder
Posts: 135
Joined: Sat, 3. Jul 10, 23:23
x4

Re: Need Help with Modding SPL M Neutron Gatling Mk2

Post by sprIder »

Hi novaford64 and welcome to the forum.

Since you're talking about .dat-files: Did you already unpack X4, which really could help you?: viewtopic.php?f=181&t=402452

Just so we're on the same page, your X4 and mod structure looks like this?:
X4 Foundations\extensions\YourMod\extensions\ego_dlc_split\assets\fx\weaponfx\macros\bullet_spl_m_gatling_01_mk2_macro.xml

In this, your code looks like this?:

Code: Select all

<diff>
  <replace sel="/macros/macro/properties/heat/@value">0</replace>
  <replace sel="/macros/macro/properties/damage/@value">100</replace>
</diff>
And of course there can be influencing factors, e.g. other mods.
Another way would be to use the ingame weapon mods to increase the weapon damage.
novaford4
Posts: 2
Joined: Fri, 23. Aug 24, 10:28

Re: Need Help with Modding SPL M Neutron Gatling Mk2

Post by novaford4 »

sprIder wrote: Sun, 25. Aug 24, 12:04 Hi novaford64 and welcome to the forum.

Since you're talking about .dat-files: Did you already unpack X4, which really could help you?: viewtopic.php?f=181&t=402452

Just so we're on the same page, your X4 and mod structure looks like this?:
X4 Foundations\extensions\YourMod\extensions\ego_dlc_split\assets\fx\weaponfx\macros\bullet_spl_m_gatling_01_mk2_macro.xml
Yes
sprIder wrote: Sun, 25. Aug 24, 12:04 In this, your code looks like this?:

Code: Select all

<diff>
  <replace sel="/macros/macro/properties/heat/@value">0</replace>
  <replace sel="/macros/macro/properties/damage/@value">100</replace>
</diff>
yes
sprIder wrote: Sun, 25. Aug 24, 12:04 And of course there can be influencing factors, e.g. other mods.
I do not have other mods
sprIder
Posts: 135
Joined: Sat, 3. Jul 10, 23:23
x4

Re: Need Help with Modding SPL M Neutron Gatling Mk2

Post by sprIder »

And you still have these problems?! Strange....
Have you copied my code and used it instead of yours, just for testing purposes?

If you would make your mod available as a download, I could take a look at it.

Return to “X4: Foundations - Scripts and Modding”