[Question - solved] Modifications to region_definitions aren't applying

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

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

Post Reply
User avatar
Nerk
Posts: 732
Joined: Tue, 8. Jun 04, 23:52
x4

[Question - solved] Modifications to region_definitions aren't applying

Post by Nerk » Wed, 25. May 22, 00:19

I hate the hull damage from The Void and wanted to write myself a little mod that limited the damage to shields only, so that the "soul" of the hazard zone would stay but it would stop blowing up my AI-driven ships.

This is what i put in my file:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <!-- The Void -->
  <replace sel="/regions/region[@name='region2_cluster_27_sector_001']/fields">
	<damagefield>
		<damage shield="500" />
		<effects shield="dmgfx_cockpit_shielddamage_01" mindelay="1.5" maxdelay="2.5" />
	</damagefield>
  </replace>
</diff>
Now when i load it, the hull damage is gone..but so is the shield damage. The hazard zone completely disappeared.
It's my first try into modding so i'm not 100% sure of what i'm doing wrong. Can anyone help?
Thanks!
Last edited by Nerk on Wed, 25. May 22, 11:53, edited 1 time in total.

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

Re: [Question] Modifications to region_definitions aren't applying

Post by DeadAirRT » Wed, 25. May 22, 02:16

Your xpath is missing /damagefield

Currently you are replacing fields with damagefield

User avatar
Nerk
Posts: 732
Joined: Tue, 8. Jun 04, 23:52
x4

Re: [Question] Modifications to region_definitions aren't applying

Post by Nerk » Wed, 25. May 22, 11:53

Ah, that's it. I thought i had to follow the xpath up to the tag before, not the actual tag itself.
Changing that fixed it. Thanks!

Post Reply

Return to “X4: Foundations - Scripts and Modding”