XBTF Question: where do you find the stations stats ?

General discussions about the games by Egosoft including X-BTF, XT, X², X³: Reunion, X³: Terran Conflict and X³: Albion Prelude.

Moderator: Moderators for English X Forum

Post Reply
Cursed Ghost
Posts: 595
Joined: Sat, 2. Oct 04, 22:44
x3tc

XBTF Question: where do you find the stations stats ?

Post by Cursed Ghost » Sat, 13. Jul 19, 18:19

Does anyone know where in the game files the stats for stations are, is there a stats file or are the stats hard coded into the games main executable ? I had a look though the t folder but that only seem to have the games text so while that gives me the stations descriptions finding there stats like

Products produced per cycle
Resources used per cycle
Cycle Time

is proving a little more elusive, while a can glean most of this info in game through careful observation that's a rather slow, tedious and error prone process so it would be better if i could just extract the necessary info from the games files, trouble is i don't seem to be able to find it.

jlehtone
Posts: 17258
Joined: Sat, 23. Apr 05, 21:42
x4

Re: XBTF Question: where do you find the stations stats ?

Post by jlehtone » Sat, 13. Jul 19, 19:41

Are those an attribute of station in any game?

At least in X2 and later the station values seem to be computed from RelValues of wares (more or less).

Not quite sure though. klarix lists in https://klarix.de/xbtf/en/XFrSet2.html
that NPC Cahoona Bakery converts
15,0 Energy Cells, 20,0 Wheat (or 6,0 Beef), and 6,0 Stott into 30,0 Cahoonas
while player's Bakeries convert
5,0 Energy Cells and 2,0 Beef into 10,0 Cahoonas

If we assume that every Factory consumes same amount of ECells per hour, then player Bakery makes 3 cycles when NPC does 1.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

User avatar
Red-Spot
Posts: 102
Joined: Wed, 9. Jan 19, 11:22
x3ap

Re: XBTF Question: where do you find the stations stats ?

Post by Red-Spot » Tue, 16. Jul 19, 16:13

Really not sure about X3, but as Jlehtone (I will Capitalize you!) already mentioned it was hardcoded in X2.
I believe it ends up being time-based on the product and the added resources stripped in relativity to their own cost and amount of wares added.
Secondary resources being a bit of a niche and 'no-resource' production simply gives you products at no cost.

IIRC you do need to (re-)trigger the factory/production task after you make an edit/place it.
I do know for sure I never really messed with scripted factories cause I never got the data I felt I needed before I could implement such thing without potentially breaking somebodies game.
'Ignoramus et ignorabimus'

Cursed Ghost
Posts: 595
Joined: Sat, 2. Oct 04, 22:44
x3tc

Re: XBTF Question: where do you find the stations stats ?

Post by Cursed Ghost » Mon, 22. Jul 19, 14:34

Are those an attribute of station in any game?
Short answer - yes

Long answer - yes they are take a look at the info screen for a given factory then you will note that each production cycle requires a certain list of resources, each production cycle takes a certain amount of time, each production cycle uses a certain amount of resources, and each production cycle produces a certain amount of the product.

Now I don’t know how Ego represent these attributes within the games files but they are defiantly there in one way or another they would have to be in order for factories to work correctly.

So

Resource - this is a list of resources that are needed for a production run to occur.
Used Per Cycle - this is the quantity of each resource that is user per production cycle.
Cycle Time - this is the time needed to do 1 production run.
Produced Per Cycle - this is the amount of the product produced per production cycle.

So in the case of say a flower farm taking the stats from https://klarix.de/xbtf/en/XFrSet2.html

Resource - Energy Cells, Teladianium, BoGas
Used Per Cycle - E-Cells(3), Teladianium(between 0 and 1), BoGas(between 0 and 5)
Cycle Time - 12 seconds
Produced Per Cycle - 6

To make things a little clearer here is a screen shot of the page I'm building obviously this is still a work in progress.

Image

as you can see in the screen shot there are a couple of bits I'm unsure about, for example the cycle time because unlike later games it doesn't actually tell you, and while i can time it on a stop watch that's not very precise, so it would be better if i could get the exact cycle time from the game files.

Then there is the usage of the secondary resources, Teladianium & BoGas which is tricky to determine due to the fact that the quantity that is used per cycle seems to be random unlike with E-cells where it uses the same amount every cycle, so again it would be better if i could extract the exact resource usage from the game files.

now i know on https://klarix.de/xbtf/en/XFrSet2.html the amount of Teladianium and BoGas used per cycle is listed as

Teladianium ~0,1
BoGas ~0,5

which i assume means

Teladianium between 0 and 1
BoGas between 0 and 5

although I'm wondering how klarix determined that hence my question about where i might find the station stats.

I had assumed that there might be a stats a file somewhere which listed all the relevant stats for each station, something akin to the the tfactories file that you find in later games, which would be the sensible thing to do as that makes life much quicker and easier if you need to make updates, but i guess X Beyond The Frontier was never designed that way, which I'm actually kind of surprised at since hard coding things like that is generally considered bad practice, for the same reasons that inline css is considered bad practice in the web development world, it makes maintenance harder and more time consuming.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 20599
Joined: Mon, 15. Nov 04, 00:26
x4

Re: XBTF Question: where do you find the stations stats ?

Post by Cycrow » Tue, 23. Jul 19, 12:39

Im not certain for XBTF, but all games pretty much do it in the same way.

You only define the product and resources that a station has. The rest like the number of products, cycle time, etc, are all generated value. It uses the Relval of the wares (stored in the wares file) to compute all these values.

In X2 and X3 the products/resources were set via the map file (and later by WareTemplate)

jlehtone
Posts: 17258
Joined: Sat, 23. Apr 05, 21:42
x4

Re: XBTF Question: where do you find the stations stats ?

Post by jlehtone » Tue, 23. Jul 19, 18:00

Cursed Ghost wrote:
Mon, 22. Jul 19, 14:34
now i know on https://klarix.de/xbtf/en/XFrSet2.html the amount of Teladianium and BoGas used per cycle is listed as

Teladianium ~0,1
BoGas ~0,5

which i assume means

Teladianium between 0 and 1
BoGas between 0 and 5

although I'm wondering how klarix determined that hence my question about where i might find the station stats.
No. The comma in ~0,1 is decimal separator. In other words: "about 0.1 units per <?>".

The Teladianium and BoGas are called "secondary resources" in later games might act as mere sinks that destroy wares (like Docks), while NPC SPPs are sources that create wares. Wares flow from sources to sinks. Production cycle of a Factory neither creates nor destroys; it simply converts ware to different form.


ECells probably have RelVal==4 that means 4 seconds per ECell. 15 ECells per minute. 900 ECells per hour.
I'd guess that Flowers have RelVal==2.
A minimal cycle would then convert 1 ECell into 2 Flowers in 1*4sec = 4 seconds.

That is awfully quick/short cycle. Player Mines on X2..X3AP have minimum cycle time of 60 seconds. Factories probably too.

However, the universe of Xbtf was smaller, so perhaps it did cope with shorter cycles. Not not as short 4 seconds, but perhaps 12 second cycles were considered manageable. You need the least common multiple of RelVals of product and all primary resources. Multiply the LCM with X that makes cycle "long enough". Multiple "per cycle" ware amounts with X.

LCM(ECells, Flowers) is apparently 4. With X==3 cycle becomes 12 seconds and amounts: 3 ECells, 6 Flowers.

Lets test bIRE Forge:

Code: Select all

Product  Beta IRE	 4.0
Resource Energy Cells 	20.0
	 Ore 		 5.0
	 Nostrop Oil 	40.0
I'd guess the RelVars are: EC 4, Nostrop 2, bIRE 20, and Ore 16. Their LCM is 80. That is long, so X=1.
Cycle time: 1 minute 20 seconds.
Amounts: EC 80/4=20, Nostrop 80/2=40, bIRE 80/20=4, and Ore 80/16=5.

The Factory stock sizes relate to the RelVals, but might have some minimum too. Factory must have space for at least one cycle.


The production is not "perfectly non-stop". Evaluating status of all stations and ships takes time. Therefore, there can be tiny pauses between cycles. Even though Flower Farm might have a 12 second cycle, it might not complete 5 cycles every 60 seconds.

A standard example of that is from X3R: Wheat Farm and Distillery. Formally, Farm makes N cycles while Distillery does 1 and Wheat is produced exactly as much as it is consumed. In practice the Farm can lag a bit and the Complex runs short on Wheat.

Such pauses are not in any data file. Luckily, one is quite unlikely to observe them in Xbtf.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

Post Reply

Return to “X Trilogy Universe”