all in one station

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

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

Post Reply
Halpog
Posts: 424
Joined: Sat, 13. Feb 21, 14:09
x4

all in one station

Post by Halpog » Sat, 2. Oct 21, 19:45

hello all

i could need some advise regarding a station change in the xml files.

i know how to change a stations ressources, thats np. but HOW do i change a stations produkts ?

<!-- <ware id="nostropoil" name="{20201,2601}" description="{20201,2602}" factoryname="{20201,2604}" group="food" transport="container" volume="1" tags="container economy">
<price min="20" average="34" max="47" />
<production time="300" amount="500" method="default" name="{20206,401}">
<primary>
<ware ware="energycells" amount="100" />
<ware ware="spices" amount="40" />
<ware ware="sunriseflowers" amount="40" />
<ware ware="water" amount="60" />
</primary>
<effects>
<effect type="work" product="0.2" />
</effects>
</production>
<container ref="sm_gen_pickup_liquid_01_macro" />
<icon active="ware_nostropoil" video="ware_nostropoil_macro" />

where at this stuff, i have to paste the other produks i wanna have in this station ?
lets say i wanna have nostropoil and scruffinfruits in 1 factory.
so plz if anyone kows help me out plz

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

Re: all in one station

Post by Shuulo » Sun, 3. Oct 21, 22:50

This is ware for product itself, it has nothing to do with what station module can produce.

look in assets\structures\production\macros

Halpog
Posts: 424
Joined: Sat, 13. Feb 21, 14:09
x4

Re: all in one station

Post by Halpog » Tue, 5. Oct 21, 06:40

<macros>
<macro name="prod_arg_foodrations10x_macro" class="production">
<component ref="prod_arg_foodrations" />
<properties>
<identification name="{201040,13401}" shortname="{201040,13403}" makerrace="argon" description="{201040,13402}" />
<build>
<sets>
<set ref="factory" />
<set ref="headquarters_player" />
</sets>
</build>
<explosiondamage value="10000" />
<hull max="1330000" />
<secrecy level="2" />
<production wares="foodrations"> <---------- this would be the parts i have to change than to look llike this ?
<queue ware="foodrations" method="10xargon" />
<production wares="teladianium">
<queue ware="teladianium" method="10xteladi" />
</production>
<workforce max="900" />
</properties>
</macro>
</macros>

Halpog
Posts: 424
Joined: Sat, 13. Feb 21, 14:09
x4

Re: all in one station

Post by Halpog » Sat, 9. Oct 21, 23:10

so, noone can answer that or help at all ?

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13289
Joined: Sun, 15. Feb 04, 20:12
x4

Re: all in one station

Post by euclid » Mon, 11. Oct 21, 18:27

Each production is done by a single modul. I guess you try to have one modul produce multiple wares/resources. I have not tried that myself but think that you'd need to add the product and its resources as in the code sniplet above. However, even if that works I'm afraid it will cause problems with the LSO as the UI might not be able to recognize multiple products of a single modul.

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

sprIder
Posts: 92
Joined: Sat, 3. Jul 10, 23:23
x4

Re: all in one station

Post by sprIder » Mon, 11. Oct 21, 19:18

I made some experiments. In X4 there seems to be no station that produces more than one product. In X Rebirth there are some stations which produce different items like drones or turrets. But not different products like wheat ore spacefuel.
The code snippet of the macro looks like this:

Code: Select all

<production wares="machinegunturret plasmaturret dumbfireturret shotgunturret laserturret swarmturret">
        <queue>
          <item ware="machinegunturret" />
          <item ware="plasmaturret" />
          <item ware="dumbfireturret" />
          <item ware="shotgunturret" />
          <item ware="laserturret" />
          <item ware="swarmturret" />
        </queue>
      </production>
Although ice and ore are no items, i just tested it with my new ice mining station:
old, one production ware:

Code: Select all

<production wares="ice">
        <queue ware="ice" method="miningstation" />
      </production>
new:

Code: Select all

<production wares="ice ore">
		<queue>
			<item ware="ice" method="miningstation" />
			<item ware="ore" method="miningstation" />
		</queue> 
      </production>
According to the encyclopedia everythink works fine:
Image

But somehow, the UI dont like it:
First picture: production of ice is wrong/negative, second picture shows the correct production. Sometimes, both displays showed the right (positive) output. But not always :gruebel:
Image

Image

And for the second ressource, ore: the first picture shows the same production/h as for ice eventhough it should be about 3 times higher - like in the second one (correct)
Image

Image

Sorry for the pictures in german, but i think the main points are understandable.
All in all i think it would work with more than one production ware in one modul/station but the UI doesn't like it/can't handle it. Like euclid predicted.

P.s.:
For your station, Halpog, it would be:

Code: Select all

<macros>
	<macro name="prod_arg_foodrations10x_macro" class="production">
		<component ref="prod_arg_foodrations"/>
		<properties>
			<identification name="{201040,13401}" shortname="{201040,13403}" makerrace="argon" description="{201040,13402}"/>
			<build>
				<sets>
					<set ref="factory"/>
					<set ref="headquarters_player"/>
				</sets>
			</build>
			<explosiondamage value="10000"/>
			<hull max="1330000"/>
			<secrecy level="2"/>
			<production wares="foodrations teladianium">
				<queue>
					<item ware="foodrations" method="10xargon"/>
					<item ware="teladianium" method="10xteladi"/>
				</queue>
			</production>
			<workforce max="900"/>
		</properties>
	</macro>
</macros>
sprIder

Halpog
Posts: 424
Joined: Sat, 13. Feb 21, 14:09
x4

Re: all in one station

Post by Halpog » Mon, 11. Oct 21, 19:29

thnx for the answer well as i told u in your mining station topic,
my reason for such a station is, to have just 1 prod module for a shipyard instead of 500 hundrets.
everything more than 30 fabriks is totaly slowing down the game, and produce laggs and FPS dropp in a sector like hell
its like i play perma in seta time :P
so i thought, when i just have 1 module that needs all ressources and produce all wares for a shipyard it would be like a nice workarround.

in german :
schade das es nciht wirklich klappt. ich habe leider absolut 0 plan von makros und dem ganzen zeugs sonst würde ich auch herumprobieren.

User avatar
euclid
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 13289
Joined: Sun, 15. Feb 04, 20:12
x4

Re: all in one station

Post by euclid » Mon, 11. Oct 21, 23:20

The LSO just displays data. That those are not correct is most likely due to the UI struggling with multiple products of a single modul. However, it does not imply that the multiple production modul is faulty. It may actual work as you've intended. You just have to live with the fact that the UI data are wrong unless some UI code specialist is willing to solve that display error (and that's not me :p ).

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

Post Reply

Return to “X4: Foundations - Scripts and Modding”