X4: Foundations

X4: Foundations

Entering System: X4 Workshop
The easiest way to find, install and manage extensions for X4: Foundations. Share your work with the community and see what others have created.
Learn More
HELP needed: trying to make a mod, need advice.
Hey everyone,

disclaimer: I've made mods before and just do this for fun, but I'm stumped on how to get this to work and need some advice!

I'm working on a mod that modifies the wares.xml file. I've successfully edited the resources needed to build modules and even created a custom build method. However, I'm having trouble changing the required resources for certain items to make scrap more versatile. I want to make it so that scrap can be turned into more than just Claytronics and Hull Parts.

I know there's a "recycle" build method in the default wares.xml that mentions "nonplayer", so I'm not sure if that is the one I'm after or not. I've been trying to adjust it through the ego_dlc_pirate/wares.xml file, but i can't seem to find the recipes for it which make me think it is in that default wares.xml file. Here’s an example of my current setup to test if the modifications are being applied, but it doesn’t seem to take effect:

Example:

<add sel="/wares/ware[@id='HullParts']">
<production time="10" amount="300" method="zeno" name="{20206,201}">
<primary>
<ware ware="energycells" amount="60" />
</primary>
<effects>
<effect type="work" product="0.37" />
</effects>
</production>
<icon active="ware_HullParts" video="ware_HullParts_macro" />
</add>

it still seems that it doesn't want to just use energy cells so I'm stumped

What I've Tried So Far:

*I'm not sure that the "nonplayer" restriction means that it won't work for that anyways but i can't get the above example to work.
Editing ego_dlc_pirate/wares.xml, but I’m not sure if another file might be overriding it.
Checking for any dependencies in other XML files (like macros.xml or components.xml) to see if they might need adjusting.
If anyone has experience with enabling different recycling outputs for scrap, could you point me in the right direction? Any advice on getting the game to recognize my modified entries would be greatly appreciated!

Questions:

do i need to edit a different file to get the result I'm looking for?
do i need to make a new module like in the "10x modules" mod and if that the case how do i edit those files in "\assets\fx\gui\textures\stationmodules" the ones that have the .gz at the end?

Thanks in advance!
Last edited by DreadNought1340; 10 Nov, 2024 @ 5:13pm