[Question] Altering new content of parent mod

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

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

Post Reply
Max Bain
Posts: 1459
Joined: Wed, 27. Jun 18, 19:05
x3ap

[Question] Altering new content of parent mod

Post by Max Bain » Mon, 9. Dec 19, 11:51

Hi, I have a problem with a mod I want to create.

My goal is to adjust the Hull values of my ship mod to fit the balancing of VRO mod. So far so good. I have added the dependancy tag and it works, but the values I have changed dont apply in the game and I think I know why, but not how to fix it.

So my new mod is based on the XR ShipPack mod and has the following folder structure:

Code: Select all

extensions\XR_ShipPack_VRO\assets\units\size_l\macros
Inside this folder there are the ship macro files for the ship values I want to adjust. The ship files have the same names as the XR ShipPack names.
Inside the macro files I have an xml string like this:

Code: Select all

<diff> 
	<replace sel="//macros/macro/properties/hull/@max">201000</replace>
</diff> 
So theoretically it should alter the Hull value of the ship with the same file name to 201000. But it does not and I guess it is because the mod is looking in the vanilla file structure for the file to replace and does not find it. I tested with some vanilla ships and these hull values I could change without a problem.

So how do I tell the game to look into the right folder for the custom added ships of the parent mod instead of searching in vanilla folders?
XR Ship Pack (adds several ships from XR) Link
Weapon Pack (adds several new weapons) Link
Economy Overhaul (expands the X4 economy with many new buildings) Link
X4 Editor (view stats of objects and make your own mod within a few clicks) Link

User avatar
alexalsp
Posts: 1823
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [Question] Altering new content of parent mod

Post by alexalsp » Mon, 9. Dec 19, 12:32

Try the structure

Code: Select all

extensions\XR_ShipPack_VRO\extensions\XR_ShipPack\
extensions\XR_ShipPack_VRO\extensions\VRO\

Code: Select all

<diff> 
	<replace sel="//properties/hull/@max">201000</replace>
</diff> 

Max Bain
Posts: 1459
Joined: Wed, 27. Jun 18, 19:05
x3ap

Re: [Question] Altering new content of parent mod

Post by Max Bain » Mon, 9. Dec 19, 12:41

alexalsp wrote:
Mon, 9. Dec 19, 12:32
Try the structure

Code: Select all

extensions\XR_ShipPack_VRO\extensions\XR_ShipPack\
extensions\XR_ShipPack_VRO\extensions\VRO\

Code: Select all

<diff> 
	<replace sel="//properties/hull/@max">201000</replace>
</diff> 
Thanks! That did it.
XR Ship Pack (adds several ships from XR) Link
Weapon Pack (adds several new weapons) Link
Economy Overhaul (expands the X4 economy with many new buildings) Link
X4 Editor (view stats of objects and make your own mod within a few clicks) Link

User avatar
Shuulo
Posts: 1629
Joined: Mon, 14. Apr 08, 17:03
x4

Re: [Question] Altering new content of parent mod

Post by Shuulo » Mon, 9. Dec 19, 12:57

Since VRO 2.0 you will need to update not only hull points, but also internal shield generator. Ill help you with my tools to do so but after VRO 2.0 release. For now you can look into the "internal shields tab" in my sheet to think about values you want to use for them to be balanced against other VRO ships.

Max Bain
Posts: 1459
Joined: Wed, 27. Jun 18, 19:05
x3ap

Re: [Question] Altering new content of parent mod

Post by Max Bain » Mon, 9. Dec 19, 14:46

Shuulo wrote:
Mon, 9. Dec 19, 12:57
Since VRO 2.0 you will need to update not only hull points, but also internal shield generator. Ill help you with my tools to do so but after VRO 2.0 release. For now you can look into the "internal shields tab" in my sheet to think about values you want to use for them to be balanced against other VRO ships.
Thanks.
So how does an internal shield work? Is it an additional indestructable shield that can have individual values for each ship? Or has it some other effects?
What is the idea behind it?
XR Ship Pack (adds several ships from XR) Link
Weapon Pack (adds several new weapons) Link
Economy Overhaul (expands the X4 economy with many new buildings) Link
X4 Editor (view stats of objects and make your own mod within a few clicks) Link

User avatar
Shuulo
Posts: 1629
Joined: Mon, 14. Apr 08, 17:03
x4

Re: [Question] Altering new content of parent mod

Post by Shuulo » Mon, 9. Dec 19, 16:09

Max Bain wrote:
Mon, 9. Dec 19, 14:46

Thanks.
So how does an internal shield work? Is it an additional indestructible shield that can have individual values for each ship? Or has it some other effects?
What is the idea behind it?
The idea behind is to untie shield regen from the number of shield modules installed. E.g. theseus has only one shield module, so capacity is low, but strong shield regeneration that is higher than buzzard with 3 shield modules. I can bring more variety that way. Behemoth with 3 shields has more shield regen than Phoenix with 4 shields, making them a bit more apart in function.
They are indestructible and not visible, you do not have to equip them in shipyard, they are implemented like ship storage directly in macro file, so its just there. Im currently testing if ill be able to make them show as internal module (just like storage etc) on ship info screen.

Post Reply

Return to “X4: Foundations - Scripts and Modding”