Confirm that defaults.xml "product" element cannot accept a "method" attribute?

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

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

User avatar
Duncaroos
Posts: 718
Joined: Wed, 4. Jan 12, 22:23
x4

Confirm that defaults.xml "product" element cannot accept a "method" attribute?

Post by Duncaroos »

Snip from v7.5 defaults.xml

Code: Select all

 
1000:           <dataset class="processingmodule">
1001-1003:         ...
1004:                 <properties>
1005-1007:               ...
1008:                    <product ware="scrapmetal" amount="150" />
As I am trying to play around with the processing module. I understand in the 'proc_gen_scrapworks_macro.xml' file for the processing module, that there is no 'production' element added in the macro's properties; instead, the defaults.xml file provides information to the game to, unless defined otherwise, produce 150x the scrap metal recipe (Every 60s: 10 ECell + 1 Raw Scrap = 1 Scrap Metal).

I tried to see if I could change line 1008 of defaults.xml to:

Code: Select all

<product ware="scrapmetal" method="Duncaroo" amount="150" />
..and updated wares.xml to add the "Duncaroo" method (Every 60s: 100 ECell + 10 Raw Scrap = 1 Scrap Metal):

Code: Select all

<production time="60" amount="1" method="Duncaroo" name="{20206,1301}" tags="noplayerbuild recycling">
   <primary>
       <ware ware="energycells" amount="100" />
       <ware ware="rawscrap" amount="10" />
   </primary>
</production>
After packaging and publishing my mod to my game folder, I was hoping to see 150x(3600/60)*1 = 9,000 Scrap Metal/hr, 90,000 Raw Scrap/hr, and 900,000 ECell/hr. This did not happen, so I suspect that the defaults.xml file cannot provide details regarding the 'method'.

Questions are:
1) Can anyone else confirm that defaults.xml cannot be used to assign a different production method for SAY scrap metal?
2) If making a 'custom' scrap processor (for say 10x efficiency or something), and to not break the original processing module - will the 'proc_gen_scrapworks_macro.xml' accept production element details to specify the output ware & method? Just want to save myself the time of creating a mod to test (to see if others tried this already).


Other findings I found:
- Only 1x 'product' element can be in a class (i.e., you cannot assign multiple products like you can using the 'queue' sub-element under a 'production' element like the recycler).

ty :)
Last edited by Duncaroos on Tue, 15. Jul 25, 04:23, edited 2 times in total.
Playing X4+All_DLC on:
CPU: Ryzen 5 5600X; RAM: 4x8GB DDR4 3200MHz; GPU: GTX 1070 8GB, Driver v536.23, DirectX 12.0; OS: Win10 Home 22H2 (19045.4780); Monitor: Single Acer S232HL 1920x1080

Duncaroo's Empire Logistics Tool (v0.23 Beta) - {{Vanilla Economy - Direct link}} {{Economy Overhaul Mod Version - Direct link}}
User avatar
Duncaroos
Posts: 718
Joined: Wed, 4. Jan 12, 22:23
x4

Re: Confirm that defaults.xml "product" element cannot accept a "method" attribute?

Post by Duncaroos »

Also, out of plain curiosity:

Was there a development reason why defaults.xml was used in this way for specifying a recipe to 'proc_gen_scrapworks_macro.xml', rather than just:

a) Having the scrapmetal ware under wares.xml simply provide the recipe like:

Code: Select all

<production time="60" amount="150" method="processing" name="{20206,1301}" tags="noplayerbuild recycling">
   <primary>
       <ware ware="energycells" amount="1500" />
       <ware ware="rawscrap" amount="150" />
   </primary>
</production>
and b) the 'proc_gen_scrapworks_macro.xml' macro to specify:

Code: Select all

<production wares="scrapmetal">
        <queue ware="scrapmetal" method="processing" />
</production>
?
Playing X4+All_DLC on:
CPU: Ryzen 5 5600X; RAM: 4x8GB DDR4 3200MHz; GPU: GTX 1070 8GB, Driver v536.23, DirectX 12.0; OS: Win10 Home 22H2 (19045.4780); Monitor: Single Acer S232HL 1920x1080

Duncaroo's Empire Logistics Tool (v0.23 Beta) - {{Vanilla Economy - Direct link}} {{Economy Overhaul Mod Version - Direct link}}
User avatar
BurnIt!
EGOSOFT
EGOSOFT
Posts: 5115
Joined: Wed, 6. Nov 02, 20:31
x4

Re: Confirm that defaults.xml "product" element cannot accept a "method" attribute?

Post by BurnIt! »

In a nutshell:
- defaults.xml does not support the method attribute for class processingmodule
- we didn't add the full support for the macro because it wasn't needed, the defaults.xml entry was good enough

We've seen this as a request to add that support and it'll be added to the list, but please understand that this does not currently have a high priority while work on 8.00 continues.
BurnIt!
In der Ruhe liegt die Kraft. / In peace lies strength.

Return to “X4: Foundations - Scripts and Modding”