[3.10 ST] drama of prodution methods

The place to discuss scripting and game modifications for X Rebirth.

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

User avatar
Marvin Martian
Posts: 3617
Joined: Sun, 8. Apr 12, 09:40
x4

[3.10 ST] drama of prodution methods

Post by Marvin Martian »

Hello,

that looks more like a modding related problem, but it effects also the vanilla game and if you doesn't fix it yet, it will be huge problem later, so please read befor move the topic at dev/null/.

First of all, XR does not use "defaupt" as the standard-method of a ware, in case it is no method specified in the production modul. The engine uses in that case simply the first production entry of the ware.
That may strategy, but in case someone add his own entry on first pisition (or ES himself change this in the ware.xml), all fabs without a defined method in the universe use that from this moment AND a lot of fabs doesn't have defined a method yet!
So it would be nice to learn your engine that no-method have to use as fallback "default", befor try to use the first entry.
In case the not specify of methods on some fabs was a prupose, maybe to use a sector-effective methode. you should define that solution too now.

That looks not as a huge problem, but i see in the Teladi-DLC you not always add the default production in ware.xml on first position, so i suppose some of the new DLC-fabs have also not add the fieldsofop - in case you will later change this behavor you will have a lot more patchwork to do. ;)
So please fix this as soon as possible, otherwise now working processes could look like sloppy work later.


The other thing is, we can not add our own methods for produktion yet, because of it looks like the engine ignore them on the produktion modul at the moment. :(
So we have to use omicron/fieldsofop/alien/malstrom dependent of what is free for the moment - thats possible, but not a good solution at all


So what i ask for:
  • define on not specified productions first the try to use the "default" method and then to use the first production-entry of the ware (like it is now)
  • fix our dlc fabs in case they will produce with the wrong method
  • add the possibility to use our own methods - or discribe us how to add
Thanks for reading
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13489
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid »

Although your feedback is very welcome this is more a suggestion rather than a bug report ;-)

Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
User avatar
Terre
Moderator (English)
Moderator (English)
Posts: 10770
Joined: Mon, 19. Dec 05, 21:23
x4

Post by Terre »

Agreed.

Click <Moved from Beta testing to S&M forum. Alan Phipps>
User avatar
Marvin Martian
Posts: 3617
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian »

like Unitrader found in the xrebirth.exe the Methods are specified like

[ external image ]

here is default completely missing, in that case the "default" entry of the dlc like that below, is fully senseless!

Code: Select all

    <ware id="shp_l_te_bulk_03" name="{20101,15301}" description="{20101,15302}" transport="ship" size="ship" volume="1" tags="ship">
      <price min="1348399" average="1797865" max="2247332" />
      <production time="126" amount="1" method="albion" name="{20206,101}">
        <primary>
          <ware ware="energycells" amount="353" />
          <ware ware="foodrations" amount="122" />
          <ware ware="fusionreactor" amount="8" />
          <ware ware="holtzmanfieldgenerator" amount="10" />
          <ware ware="microchips" amount="83" />
          <ware ware="reinforcedmetalplating" amount="31" />
          <ware ware="scanningarray" amount="8" />
        </primary>
      </production>
      <production time="126" amount="1" method="omicron" name="{20206,301}">
        <primary>
          <ware ware="bofu" amount="57" />
          <ware ware="emspectrometer" amount="9" />
          <ware ware="energycells" amount="353" />
          <ware ware="fusionreactor" amount="8" />
          <ware ware="holtzmanfieldgenerator" amount="10" />
          <ware ware="plasmapumps" amount="44" />
          <ware ware="reinforcedmetalplating" amount="31" />
        </primary>
      </production>
      <production time="126" amount="1" method="default" name="{20206,601}">
        <primary>
          <ware ware="energycells" amount="353" />
          <ware ware="foodrations" amount="122" />
          <ware ware="fusionreactor" amount="8" />
          <ware ware="holtzmanfieldgenerator" amount="10" />
          <ware ware="microchips" amount="83" />
          <ware ware="scanningarray" amount="8" />
          <ware ware="teladianium" amount="251" />
        </primary>
      </production>
      <component ref="units_size_l_te_kit_bulk_03_macro" amount="1" />
      <icon video="units_size_l_te_kit_bulk_03_macro" />
    </ware>
Maybe Egosoft himself don't know how it really works - isn't it?

so is it bug, or feedback?
User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13489
Joined: Sun, 15. Feb 04, 20:12
x4

Post by euclid »

Hi Marvin,

Stations with a module of multiple ware productions do have a problem because they overload the storage with one type and then cannot produce another which usually is in high demand. That has been reported already and it was suggested to add a feature for the player to decide what is produced, i.e. a setting in the station's production modul to stop the current production and switch to another.

It seems you (and Unitrader) have investigated the cause of the problem and I'm confident the developers will appreciate your findings. However, I'm not sure about the priority of this issue so it may take a while before it will be addressed.


Cheers Euclid
"In any special doctrine of nature there can be only as much proper science as there is mathematics therein.”
- Immanuel Kant (1724-1804), Metaphysical Foundations of the Science of Nature, 4:470, 1786
User avatar
BurnIt!
EGOSOFT
EGOSOFT
Posts: 5120
Joined: Wed, 6. Nov 02, 20:31
x4

Post by BurnIt! »

Hi,

I reviewed this case and I cannot observe any of the behaviour described here. It's working as intended.

If there is no entry matching the name of the production method as specified in the buildmodule or productionmodule it uses the one named "default" (the order in which methods are defined in wares.xml does not matter at all)

Using your example of the 'shp_l_te_bulk_03' this is pretty easy to test. That's the definition for building a Vulture (Bulk) at the Teladi Overwatch station.
For testing I removed the build method definition from the buildmodule macro and tested in-game. It correctly defaulted to the buildmethod "default". When I try to build such a ship it correctly requires Teladianium which only the default method specifies.
BurnIt!
In der Ruhe liegt die Kraft. / In peace lies strength.
User avatar
Marvin Martian
Posts: 3617
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian »

fascinating - i think you are right about the default behavior (at the moment ... i will be watching you :P )

but i am confused why

Code: Select all

<add sel="//wares/ware[@id='refinedmetals']/price" pos="after" >
<!-- new individual method -->
</add>
instead of

Code: Select all

<add sel="//wares/ware[@id='refinedmetals']/production[@method='default']" pos="after" >
<!-- new individual method -->
</add>
changed the (default?) productions of some stations in the universe
first method looks not sooooo wrong, but doesn't work without chaotic consequences

----

ANYWAY, the other point about method="myfoobar" (or every other individual) is open already and the system switch back to "default" if i try to force my station to use it
lubatomy
Posts: 236
Joined: Mon, 29. Dec 03, 15:22
x4

Post by lubatomy »

if you want to make a new production method and have only player stations use that method, then you have to change lots of things:

1 - define the new production method first

2 - create an exact copy of the station macro file of the station you want to use this method but add _player_ to the station file names. Add those new names in the appropriate xml file to the macro.xml file that lists all macros the game uses. example would be struct_bt_alb_metal_works_macro.xml to name struct_bt_alb_metal_works_player_macro.xml

3 - edit the files that define what stations the architect allows you to build to replace the original station with the new one with the "_player_" label in it. file is buildmodule_stations_albion_macro.xml for the albion station made by a construction ship purchased in albion.

4 - create a copy of the relevant production modules and give them a new name. Add that name as needed to the macro file. Set that new production module to build using your newly defined method from step one. Again this should be just the macro file itself where it defines the production method. all you should have to do is change the production method and the name of the macro. example would be struct_econ_prod_refinedmetals_macro.xml to name struct_econ_prod_refinedmetals_player_macro.xml and then for the production line make sure to add method="mynewmethod" or whatever method you named it.

5 - in the new station file, tell it to use the new production modules instead of the vanilla production modules. ie change the file in step 2 so that any reference to the original macro in step 4 is now the reference to the new macro (one with "player" added to name)

That should do the trick. I have added new production methods in the past and made an existing station use those methods. on a side note, production method changes are not very save game friendly and in general require a new game to actually see the changes work because they will not change any pre-existing stations, only stations created after the change but if your adding a new station you should not have to worry about that as it will by definition be created after the change.
User avatar
Marvin Martian
Posts: 3617
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian »

whats the trick for step one?

if i add the process entry to the ware in ware.xml this method will not used on a production process, or listed in the encyclopedia
the same entry with an "official" method (that not used already on that ware) works in case
TheDeliveryMan
Posts: 884
Joined: Sat, 10. Dec 11, 03:10
x4

Post by TheDeliveryMan »

@lubatomy: Have you checked that the original factories are uneffected by your addition to wares.xml?
lubatomy
Posts: 236
Joined: Mon, 29. Dec 03, 15:22
x4

Post by lubatomy »

if you add the new production method to wares, the original factories should not care.

way things work:

buildtree macro tells the station what parts to use. NPC stations all use the vanilla files. You make a copy of the buildtree file (struct_bt_xxxx_macro.xml from above) and it will not affect anything for regular stations. infact making a copy of it like mentioned above in step 2 just makes a exact copy of the vanilla station that never gets used by anything.

to make the station get used you have to tell a constuction ship to be able to build it (defined in the buildmodule_stations_xxxx_macro.xml from above). once you do that, you can now build the new station with a construction ship but the new station is still identical to the original station at this point (good for testing to make sure it all works).

build tree tells the game that the station is built with certain modules in a certain order and the parts go in certain locations.

making a copy of a production module (like step 4 above) creates an exactly identical production module that the game does not use yet. to make it used, you have to change the build tree file to tell it to use the new production module. if you have not changed anything in the new production module macro other than the name (and of course getting them listed as macro the engine can use in the macro.xml file) then your new station at this point should still build identical to the original station and use the same production method. again nice for being able to test things up to this point.

now you add the method to the new production file and the only station that will be affected is the new one you made because that is the only station that uses the new production module and the new production module is the only one that uses the new method. all other stations should not be affected.

as for checking other stations, the only time i messed with all that was when i was working on attempting to solve the plot built urv station not building anything. I created special production methods for the drones, made sure the production module for the plot station was set to 1 build the drones and 2 use the method i had created. that production module was unique to that station and that station is unique in that the only way you typically get it is through the plot. when i did it, it worked, it used the right method i made up, and it did not affect any other station that build URV drones. As long as you dont change the original files, the other stations will not be affected. its just a matter of making sure you patch the wares.xml file correctly. If I was doing it I would make it so that my production method was listed after all the other egosoft provided construction methods but that is just the way i like to do things.

part of the reason for making the copies of the macro files and giving them different names is so that you do not screw up the vanilla stations because they still point to the vanilla files which you are not messing with or changing (except for the wares.xml and macro.xml files).

Also through other modding and looking at even vanilla files, It proves that you can have more than one macro pointing to the same references. this is done most on the engines where there is one size L engine but several macros for it that have different speed values because they are used by different ships. in the case above we are just making new macros that point to original references but the new macro is the only one we are changing and affecting.
TheDeliveryMan
Posts: 884
Joined: Sat, 10. Dec 11, 03:10
x4

Post by TheDeliveryMan »

Alright, here is a minimal example:

XR Beta 3.10 Special Test + Teladi Outpost, no other mods except MinimalExampleMethod which contains just two files:

content.xml:

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?><?xml-stylesheet href="../../content.xsl" type="text/xsl" ?>

<content id="MinimalExampleMethod" name="Minimal Example Method" description="..." author="TheDeliveryMan" date="2015-01-21" version="1" save="true" enabled="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="content.xsd">
	<text language="44" name="Minimal Example Method" description="..." author="TheDeliveryMan" />
</content>
libraries/wares.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <add sel="//wares/ware[@id='fuelcells']/production[@method='default']" pos="before" >
    <production time="600" amount="900" method="yaki" name="My Yaki Method">
      <primary>
        <ware ware="energycells" amount="800" />
        <ware ware="spacefuel" amount="76" />
      </primary>
      <secondary>
        <ware ware="narcotics" amount="12" />
      </secondary>
      <effects>
        <effect type="secondaryresource" product="0.15" />
        <effect type="specialist" product="0.1" />
        <effect type="manager" product="0.03" />
        <effect type="engineer" product="0.03" />
        <effect type="defencecontrol" product="0.03" />
      </effects>
    </production>
  </add>
</diff>
I'll start a new Free Play game, fly to Gemstone Manufacture, scan the HOA Cell Recharge Fac and see that it uses "My Yaki Method" to produce Fuel Cells.
lubatomy
Posts: 236
Joined: Mon, 29. Dec 03, 15:22
x4

Post by lubatomy »

that is an interesting one. I never ran into that problem but then as i said i put my method at the end of the list.

in the one i did, I added new methods for all drones and then in the diff selection i selected the production group with method="omicron" and used pos='after' similar to the second patch method Marvin posted.

If i can not say why it would change if you put it before the default method like that. I just know that adding it in at the end worked fine.
TheDeliveryMan
Posts: 884
Joined: Sat, 10. Dec 11, 03:10
x4

Post by TheDeliveryMan »

If I use

Code: Select all

<add sel="//wares/ware[@id='fuelcells']/production[@method='default']" pos="after" >
the Cell Recharge Fac in Gemstone Manufacture uses the Albion method as it should. But in this case I haven't been able to create a new Cell Recharge Fac station that uses method="yaki". Changing method="yaki" to method="maelstrom" in all of my files works just fine, btw.
lubatomy
Posts: 236
Joined: Mon, 29. Dec 03, 15:22
x4

Post by lubatomy »

with out seeing the rest of the changes you have made, I can not begin to guess where the issue is.

how have you been trying to force the change in production method?
Phipsz
Posts: 335
Joined: Mon, 23. Apr 12, 23:56
x4

Post by Phipsz »

TheDeliveryMan wrote:If I use

Code: Select all

<add sel="//wares/ware[@id='fuelcells']/production[@method='default']" pos="after" >
the Cell Recharge Fac in Gemstone Manufacture uses the Albion method as it should. But in this case I haven't been able to create a new Cell Recharge Fac station that uses method="yaki". Changing method="yaki" to method="maelstrom" in all of my files works just fine, btw.
did you change

Code: Select all

<production wares="fuelcells" /> 
for struct_econ_prod_fuelcells_macro to instead

Code: Select all

<production wares="fuelcells">
  <queue ware="fuelcells" method="yaki" />
</production>
? That is what BurnIt! did as far as I understand.[/i]
TheDeliveryMan
Posts: 884
Joined: Sat, 10. Dec 11, 03:10
x4

Post by TheDeliveryMan »

I'm not using a construction vessel, I'm adding my station directly to the map in zones.xml

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<diff>
  <add sel="/macros/macro[@name='tzoneCluster_B_Sector04_Zone31_macro']/connections">
    <connection name="struct_bt_yaki_fuelstation_macro" ref="stations">
      <offset>
        <position x="21589.4" y="0" z="-24700.824" />
        <quaternion qx="0" qy="0" qz="0" qw="1" />
      </offset>
      <macro ref="struct_bt_yaki_fuelstation_macro" connection="space">
        <properties>
          <identification owner="beryll" />
          <build>
            <upgrade>
              <upgrade upgrade="turret_shortrange" level="1" />
              <upgrade upgrade="turret_midrange" level="1" />
              <upgrade upgrade="turret_missile" level="1" />
              <upgrade upgrade="shieldgenerator" level="1" />
              <upgrade upgrade="flak" level="1" />
            </upgrade>
            <plan sequence="A" stage="1" />
            <plan sequence="B" stage="2" />
          </build>
        </properties>
      </macro>
    </connection>
  </add>
</diff>
That's in Steady Mole, and I always start new Free Play game for testing.

I copied struct_bt_ol_fuelstation_macro.xml and struct_econ_prod_fuelcells_ol_macro.xml and changed the _ol_ part of the filenames to _yaki_. My index/macros.xml:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!-- ?xml-stylesheet href="index.xsl" type="text\xsl" ? -->
<index>
  <entry name="struct_bt_yaki_fuelstation_macro" value="extensions\MinimalExampleMethod\assets\structures\build_trees\macros\struct_bt_yaki_fuelstation_macro"/>
  <entry name="struct_econ_prod_fuelcells_yaki_macro" value="extensions\MinimalExampleMethod\assets\structures\economy\production\macros\struct_econ_prod_fuelcells_yaki_macro"/>
</index>
Changes made to struct_bt_yaki_fuelstation_macro.xml (original lines commented out):

Code: Select all

<macros>
  <!--
  <macro name="struct_bt_ol_fuelstation_macro" class="station" alias="struct_bt_alb_fuelstation_macro">
  -->
  <macro name="struct_bt_yaki_fuelstation_macro" class="station" alias="struct_bt_alb_fuelstation_macro">
    <component ref="struct_bt_ol_fuelstation" />
    <properties>
      <identification name="{20102,5901}" description="{20102,5902}" unique="0" />
    </properties>
    <connections>
      <!-- ... -->
      <!--
      <connection ref="ConnectionFor_struct_econ_prod_fuelcells_ol_macro">
        <macro ref="struct_econ_prod_fuelcells_ol_macro" connection="space" />
      </connection>
      <connection ref="ConnectionFor_struct_econ_prod_fuelcells_ol_macro1">
        <macro ref="struct_econ_prod_fuelcells_ol_macro" connection="space" />
      </connection>
      <connection ref="ConnectionFor_struct_econ_prod_fuelcells_ol_macro2">
        <macro ref="struct_econ_prod_fuelcells_ol_macro" connection="space" />
      </connection>
      <connection ref="ConnectionFor_struct_econ_prod_fuelcells_ol_macro3">
        <macro ref="struct_econ_prod_fuelcells_ol_macro" connection="space" />
      </connection>
      -->
      <connection ref="ConnectionFor_struct_econ_prod_fuelcells_ol_macro">
        <macro ref="struct_econ_prod_fuelcells_yaki_macro" connection="space" />
      </connection>
      <connection ref="ConnectionFor_struct_econ_prod_fuelcells_ol_macro1">
        <macro ref="struct_econ_prod_fuelcells_yaki_macro" connection="space" />
      </connection>
      <connection ref="ConnectionFor_struct_econ_prod_fuelcells_ol_macro2">
        <macro ref="struct_econ_prod_fuelcells_yaki_macro" connection="space" />
      </connection>
      <connection ref="ConnectionFor_struct_econ_prod_fuelcells_ol_macro3">
        <macro ref="struct_econ_prod_fuelcells_yaki_macro" connection="space" />
      </connection>
      <!-- ... -->
    </connections>
  </macro>
</macros>
changes made to struct_econ_prod_fuelcells_yaki_macro.xml:

Code: Select all

<macros>
  <!--
  <macro name="struct_econ_prod_fuelcells_ol_macro" class="production">
  -->
  <macro name="struct_econ_prod_fuelcells_yaki_macro" class="production">
    <component ref="struct_econ_prod_fuelcells" />
    <properties>
      <identification name="{20201,1511}" description="{20201,1512}" unique="0" />
      <explosiondamage value="100000" />
      <hull max="19100000" />
      <production wares="fuelcells">
        <!--
        <queue ware="fuelcells" method="omicron" />
        -->
        <queue ware="fuelcells" method="yaki" />
      </production>
    </properties>
    <!-- .... -->
  </macro>
</macros>
User avatar
Marvin Martian
Posts: 3617
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian »

TheDeliveryMan wrote:the Cell Recharge Fac in Gemstone Manufacture uses the Albion method as it should. But in this case I haven't been able to create a new Cell Recharge Fac station that uses method="yaki". Changing method="yaki" to method="maelstrom" in all of my files works just fine, btw.
*facepalm*
everyone knows thats not a problem to create a new production or new wares!
We want to creat&use own methods like your "yaki" or "suflaki" not the egosoft created (yes they works) - that is the point of the problem, not more, not less :wink:
lubatomy
Posts: 236
Joined: Mon, 29. Dec 03, 15:22
x4

Post by lubatomy »

well the one i made, I called it a devries method because there was not a devries method for that item already. It may be the case that the method names are limited to just those that the devs have already used (default, devries, omicron, ect.).
TheDeliveryMan
Posts: 884
Joined: Sat, 10. Dec 11, 03:10
x4

Post by TheDeliveryMan »

lubatomy wrote:well the one i made, I called it a devries method because there was not a devries method for that item already. It may be the case that the method names are limited to just those that the devs have already used (default, devries, omicron, ect.).
Well, I really thought you were able to use a method with a new name and was trying to figure out if I might do something subtle wrong. The conclusion in the German forum was that we can only use one of the built-in methods (alien, albion, devries, maelstrom, omicron and fieldsofop).

As far as I can tell the first entry in wares.xml that does not match any of the built-in method names will be taken as the default production method. That's why

Code: Select all

<add sel="//wares/ware[@id='fuelcells']/production[@method='default']" pos="before" >
    <production time="600" amount="900" method="yaki" name="My Yaki Method">
      <!-- ... -->
    </production>
</add> 
changed the production method of the HOA Cell Recharge Fac.

Return to “X Rebirth - Scripts and Modding”