Tutorial: Advanced Factory Management; chains & formulae

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

Locked
User avatar
Reven
Posts: 1133
Joined: Thu, 10. Jul 03, 07:42
x4

Tutorial: Advanced Factory Management; chains & formulae

Post by Reven » Wed, 28. Jan 04, 16:04

Relationship between Resources & Products
All factories in the X universe are designed around the concept of interoperability. That is, if you have a Cahoona Bakery, it is designed to consume Argnu Beef at the exact rate that a Cattle Ranch can produce it. All factories work this way.

They each can hold exactly 5 hours 33 minutes and 20 seconds worth of resources. That is 5.555 (repeating) hours worth. The same goes for product. This makes it easy to determine the rate of resource usage per minute or per hour. If you want to know how much of a resource a factory will consume per hour, then take the amount of it the factory can hold, and divide it by 5.555 to get the amount that will be consumed per hour. Divide that by 60 to get the amount consumed per minute.

If you go around and look at all your factories, you will find that whatever length their production cycle is, they always use resources at the same rate. For example, energy. All factories (except for Solar Power Plants) use energy - and despite the fact that different factories take different amounts of time to make their products, you will find that they all use energy at a rate of precisely 15 units per minute. If you take 5000, which is the amount of energy any factory can store, and divide it by 5.555 (repeating), you get 900 units per hour, which is 15 per minute. So the formula works.

Like any rule, though, there are exceptions. Two of them in fact. The first is a mine. We will cover that later in the turtorial. The other exception, is the Solar Power Plant. This is a special case that makes the economy work.

A Solar Power Plant is special. It is the only factory in the X universe that makes a product faster than it consumes a resource. A normal Solar Power Plant (or SPP) uses crystals at a rate of one every 59 seconds. Which, for all intents and purposes, is the same rate that a Crystal Fab produces them (1 per minute). However, if our rule were to hold out for a SPP, then it would produce only 15 energy per minute. Instead, it produces 138 per minute. This is enough energy to feed 9 factories!

And this is the basis of making a profit. Energy is the basic unit in the X universe. If you want to make a chain of factories that makes products without costing you any money, then you need to produce free energy. This is possible because a Solar Power Plant produdes more energy than it takes to make the crystals that it consumes. More than twice as much, actually. Here is how you figure it... a Solar Power Plant requires:
  • 1 x Crystal Fab which uses 15 energy per minute, plus the output of one food factory and one Silicon mine.
  • 1 x Food Factory for the Crystal Fab (depends on what race's crystal fab you use - in the case of the Argon, Crystal Fab, this will be a Cahoona Bakery) which uses 15 energy per minute plus the output of one farm.
  • 1 x Farm for the Food Factory (ie: Cattle Ranch), which uses 15 energy per minute.
  • 1 x Silicon Mine, which uses 15 energy per minute
  • -----------------------------------------------------------------------------------
  • Grand Total: 60 energy cells per minute.
So there you have it. The requirements for producing free energy is to build a Solar Power Plant, three factories, and a mine. The solar power plant will have to divert 60 units of energy per minute of its total output of 136 per minute in order to provide for its feeder factories. To calculate this simply, just think of any Solar Power Plant as being able to feed 9 factories. Subtract the 4 needed to feed it, and a Solar Power Plant can produce enough free energy to feed 5 more factories.

Free Energy
In order to chain the factories without using money, you will need to make a small upgrade to your "Buy Ware" command. As it currently sits, there is no way to order your transports to buy resources for a factory only from a factory you own. To build a factory chain that requires no money, you need to download and install the excellent script written by Raskor414 that acts as a replacement for the "Trade->Buy Ware..." command. Once it is installed, you can now order your transports for a factory to "buy" resources from a factory you own. And when the transports are buying from another factory that you own, you can tell them not to pay for the resources (pay 0 credits).

We will go through and set up a chain of factories to make free energy. For this setup, I am assuming you are buying Argon factories. You buy one Solar Power Plant, one Crystal Fab, one Cahoona Bakery, one Cattle Ranch, and one Silicon Mine (place the mine on an asteroid of yield 25 or more).

It will take some money to get things originally set up. You need to get all the factories up and running initially. For that, you will probably have to buy some resources made locally. Meatsteak Cahoonas are hard to find in quantity. A tip is that the sector Nyana's Hideout has three Cahoona Bakeries that are almost always all full. I won't cover how to perform the initial setup of the factories. It is assumed you have built factories before and know how to get them running. One note, though - make sure that you set all these factories to NOT sell to other races.

Once they are all running, you need to chain them. The Cattle Ranch will have one freighter. Order it to "Trade->Buy Ware...". You then select your power plant and energy cells as the resource. The new script will then ask how many times to make the trip. Use "-1" as the value - that will tell the script to run forever. The script will then ask how much to pay per unit. You don't want to pay anything, so enter zero here.

For the Cahoona Bakery you need two freighters. For the first, do exactly what you did with the Cattle Ranch's freighter - tell it to buy energy cells from your power plant at zero cost. For the second, tell it to buy Argnu Beef at zero cost from your Cattle Ranch.

The Crystal fab will get energy at zero cost from the power plant, meatsteak cahoonas from the bakery at zero cost, and silicon from the mine at zero cost. The mine gets energy at zero cost from the power plant.

And now... you're done. A solar power plant that is supplied at zero cost.

Free Energy - Now What?
You've got free energy now, so what do you do with it? Well, one of two things - you can sell it. You are diverting 60 units of energy per minute from the solar power plant to feed the factory chain. Assuming that you sell energy at the full 23 credits per unit, this is like getting crystals at 1380 credits each (23 * 60). This Solar Power Plant will make more money than any SPP that buys its crystals from the market.

The real benefit, though, is in setting up other factories. As mentioned earlier, a normal SPP will produce enough energy to feed 9 factories in total - 5 factories more than it takes to supply the crystals. You can use this setup to make any factory that produces for free. A Laser Tower factory requires a Silicon Mine, food factory, and farm to supply it. That's 4 factories. A single SPP chain will supply that for free and have enough left over for one more factory.

If you convert all your factories over to using free energy, this simplifies accounting greatly. You don't need complex accounting scripts - you can simply drain all the money from any factory that actually sells to the public. None of your factories need to have a "base amount" of money in them any more. Drain them all. Free money!

Higher-output Solar Power Plants
As mentioned earlier, the Solar Power Plant is an exception to the rule of always using the same amount of resources. If you look at the galactic map, you will see that each sector has a "Suns" value expressed as a percentage. Any solar power plant in a sector that has greater than 100% will produce energy faster, and also consume crystals faster. On the surface this looks like it would throw everything out of wack. And if you wanted to run these plants at full output, it would throw everything out of wack.

However, the simplest answer is to ignore it. The "Suns" value will never be under 100%. So, if you still treat all Solar Power Plants as if they will feed a total of 9 factories, you will never consume more than 135 energy cells per minute. Then these SPPs will never try and produce faster than a single crystal fab can feed them. If you were to try and run them at full, in a 150% sun sector, you would need to use 3 crystal fabs to feed 2 SPPs. That means you would need 2 freighters for each SPP to buy crystals. The cost of this makes it just as simple to build one SPP for each crystal fab chain. The added complexity doesn't save any money, and just makes it harder on you.

High-Yield Mines for Profit
Silicon and Ore mines are the other exception to the rate rule. With an Ore or Silicon mine, the production rate is based on the yield of the asteroid it is built on. Asteroid yields are also standardized across the X universe, with the base standard being an asteroid with a yield of 25. That is, if you place a mine (Ore or Silicon) on an asteroid with a yield of 25, then that mine will make products at the exact rate that any factory uses it.

For example, a Crystal Fab can hold 208 units of Silicon Wafers. It consumes them at a rate of 5 every 8 minutes, or 5/8ths of a unit per minute. A silicon mine built on an asteroid with a yield of 25 will produce exactly 5/8ths of a unit per minute (or 1 unit every minute and 36 seconds). This same hypothetical mine will also consume energy cells at the standard rate of 15 units per minute. As the yield of the asteroid increases, both the consumption of energy and the production of products increases. So a higher yield asteroid does not make a mine that is any more efficient, it is just faster. If you want to have enough Ore or Silicon produced from any one mine to feed a factory, then you must build it on an asteroid with a yield of 25 or more.

If you are using the mine to feed a factory, you can simply ignore it if it has a higher yield than 25. The factory will only use Ore or Silicon at the standard rate, which will limit the mine to producing it at the standard rate, which will cause it to consume energy at the 15 units/minute standard rate . No worries - it's all standard. Really, it's standard I tell you.

If, though, you want to sell the Ore or Silicon, then you need to work out how much energy it will consume so you know how much to allocate from your SPP chains.

To work out how much energy per minute a mine will use is easy. Divide the yield of the asteroid by 25, and this will give you the relative speed of a mine built on it. That is, a mine built on an asteroid with a yield of 50 will work twice as fast as "standard". A silicon mine on a 50 yield asteroid will produce 1.25 units per minute and consume 30 units of energy per minute.

If you are using the easy way to calculate factory chains, which is that a SPP will produce enough energy for 9 factories in total (or 5 after the consumption), then simply think of an asteroid with a higher yield as more than one factory. The "standard factory equivalence" of a mine is the same as its speed - the yield of the asteroid divided by 25.

Formulae
Here is a list of all the formulae:
  • Resource consumption per Hour = Resource Capacity / 5.555555
  • Resource consumption per Minute = Resource Capacity / 333.333333
  • Production Rate formula = Resource Consumption formula
  • Ore Production Rate from Ore Mine per Minute = (Yield / 25) * 2.5
  • Silicon Production Rate from Silicon Mine per Minute = (Yield / 25) * .625
  • Standard Factory Equivlance Rating of Mine = Yield / 25
Resource Capacity is the amount of a resource that any factory will hold.
Last edited by Reven on Wed, 28. Jan 04, 20:53, edited 6 times in total.
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum

Steel Chicken2
Posts: 97
Joined: Mon, 19. Jan 04, 21:33

Post by Steel Chicken2 » Wed, 28. Jan 04, 16:38

+1 stickyify it mods!

You know whats funny, the noobs wont read this cause its over 5 lines.
LOL

User avatar
3iff
Posts: 1085
Joined: Thu, 23. Oct 03, 09:52
x2

Post by 3iff » Wed, 28. Jan 04, 16:52

If you want to know how much of a resource a factory will consume per hour, then take the amount of it the factory can hold, and divide it by 5.555 to get the amount that will be consumed per hour. Multiply that by 60 to get the amount consumed per minute.
Last line you mean DIVIDE that by 60

Excellent post...still reading it.

Another: Suns will never be below 0%. Actually there is one sector with zero sun output...
Last edited by 3iff on Wed, 28. Jan 04, 16:57, edited 1 time in total.

User avatar
Reven
Posts: 1133
Joined: Thu, 10. Jul 03, 07:42
x4

Post by Reven » Wed, 28. Jan 04, 16:54

3iff wrote:
If you want to know how much of a resource a factory will consume per hour, then take the amount of it the factory can hold, and divide it by 5.555 to get the amount that will be consumed per hour. Multiply that by 60 to get the amount consumed per minute.
Last line you mean DIVIDE that by 60

Excellent post...still reading it.
My wife said the same thing when she proofed it just now. I was tired when I wrote it. :)
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum

MaEr
Posts: 43
Joined: Tue, 2. Dec 03, 09:44
x2

Post by MaEr » Wed, 28. Jan 04, 17:01

Another great tutorial Reven, good job! I liked the one about pirate captures with the TL aswell. :)

User avatar
3iff
Posts: 1085
Joined: Thu, 23. Oct 03, 09:52
x2

Post by 3iff » Wed, 28. Jan 04, 17:02

I'm not surprised...I'd be tired if I wrote all that.

I've been coming to the same conclusions as you (some of them anyway) and I'm using these techniques for building my Unknown Sector industrial base. I'm not worrying about the cashless system but getting the factory quantities in harmony means I have less worries about supplies. Due to initial problems I have small surplusses building up but I can easily sell them off...

One problem is that I keep dipping into the energy stocks to supplement my jump fuel...

kylereich
Posts: 325
Joined: Mon, 17. Nov 03, 16:38
x3

Post by kylereich » Wed, 28. Jan 04, 17:04

Very good information. Thanks.

Kyle

KaosKlown
Posts: 68
Joined: Sat, 29. Nov 03, 18:22
x3

Post by KaosKlown » Wed, 28. Jan 04, 18:35

Sticky please!

dragonemp
Posts: 211
Joined: Sat, 24. Jan 04, 01:45
xr

Post by dragonemp » Wed, 28. Jan 04, 18:39

I'm curious why bother use some script to get "free" ec....... you DO know by money transfer from 1 account to another you are NOT losing money, right?
for each fab, just set price to what you fell comfortable, if they buy from your OWN fab, you are not making money, but not losing money either, if they buy from npc for lower price, you are MAKING money.........

Bane_v2
Posts: 543
Joined: Tue, 30. Dec 03, 03:52
x3tc

Post by Bane_v2 » Wed, 28. Jan 04, 19:36

This may not be the best thread to ask this in, but...

Is there a GOOD reason (besides creating supplies for your own fleet) why you should build factories other than SPP's? I prefer a small fleet so finding equipment is not an issue.

Great post regardless. Thanks for it!

dragonemp
Posts: 211
Joined: Sat, 24. Jan 04, 01:45
xr

Post by dragonemp » Wed, 28. Jan 04, 19:38

there's lots of reason, like not enough crystal....builder crystal fab... then not enough bofu.... build bofu fab.... then not enough bogas.... builde bogas fab.... :)

Nestan
Posts: 268
Joined: Wed, 3. Dec 03, 22:43
x3tc

Post by Nestan » Wed, 28. Jan 04, 19:53

Excellent post revan, I am currently already doing exactly what you said in 3 seperate areas of the X2 Universe. I am still upgrading some of my other areas to do the same thing. My military production area currently pumps out on average 20 X 125MW Shields, 45 X 25MW Shields, 15 X BHEPTs, and 50GPAC's a day all free without dumping any money in. This helps temendously as I am trying to fill carriers with Nova's and Perseus and now that I dont have to buy any weapons or shields it means I can buy all S class ships. I just need to pickup a AHEPT factory and I will be sitting pretty.

The_Rock
Posts: 4088
Joined: Wed, 6. Nov 02, 20:31
x2

Post by The_Rock » Wed, 28. Jan 04, 20:01

Steel Chicken2 wrote:...
You know whats funny, the noobs wont read this cause its over 5 lines.
LOL
well you did...

Steel Chicken2
Posts: 97
Joined: Mon, 19. Jan 04, 21:33

Post by Steel Chicken2 » Wed, 28. Jan 04, 20:50

The_Rock wrote:
Steel Chicken2 wrote:...
You know whats funny, the noobs wont read this cause its over 5 lines.
LOL
well you did...
OOOOO lets get personal. Very mature.

Darshu
Posts: 1085
Joined: Sun, 11. Jan 04, 02:13
x3

Post by Darshu » Wed, 28. Jan 04, 20:52

Excellent guide. Easy to read, and very informative.

Is this one going up at the Commander's Space Station too? :D

The_Abyss
Posts: 14933
Joined: Tue, 12. Nov 02, 00:26
x3

Post by The_Abyss » Wed, 28. Jan 04, 20:54

Darshu wrote:Excellent guide. Easy to read, and very informative.

Is this one going up at the Commander's Space Station too? :D
I've got first dibs on this one.... :wink:
Strung out on Britain's high, hitting an all time low

Nemesi$
Posts: 120
Joined: Wed, 12. Nov 03, 19:05
x4

Post by Nemesi$ » Wed, 28. Jan 04, 21:01

dragonemp wrote:I'm curious why bother use some script to get "free" ec....... you DO know by money transfer from 1 account to another you are NOT losing money, right?
for each fab, just set price to what you fell comfortable, if they buy from your OWN fab, you are not making money, but not losing money either, if they buy from npc for lower price, you are MAKING money.........
That's exactly how I set up my Empire. I'd written myself a tiny PHP-Script thats connected to a MySQL-Database. This script is calculating the lowest price a factory can buy its products from a self-owned chain while no factory is loosing money. For the coders: I used a recursive function to get this working.
The base are always the ECells. Since they can't be cheaper than 11 (actually 10.3768) Cr. in production because the lowest price for crystals is 1432.

Soon as I'll get finished filling up my Database and all scripts are done I will publish that stuff on the web. For now you can have a sneak preview at http://mom.frag-warez.org/x2/stationdetails.html
Die Zehn Gebote haben 279 Wörter, die amerikanische Unabhängigkeitserklärung hat 300 Wörter. Die EU-Verordnung zur Einfuhr von Karamelbonbons hat 25911 Wörter. [Bodo H. Hauser]

User avatar
Reven
Posts: 1133
Joined: Thu, 10. Jul 03, 07:42
x4

Post by Reven » Wed, 28. Jan 04, 21:06

dragonemp wrote:I'm curious why bother use some script to get "free" ec....... you DO know by money transfer from 1 account to another you are NOT losing money, right?
for each fab, just set price to what you fell comfortable, if they buy from your OWN fab, you are not making money, but not losing money either, if they buy from npc for lower price, you are MAKING money.........
I realize that money transfer between stations that you own doesn't mean you are losing money. However, it is impossible without an extra script to force a factory that you own to buy a resource only from another particular factory that you also own. The only "looping" script that obtains resources is "Buy ware at best price...". There are little tricks you can do to make that script tend to only buy from your own factories, but you can't force it to.

The factory chains described in the tutorial need to be precise. You need to be able to control exactly where each factory obtains its resources from. As an example, in my game I have 3 power plants in Kingdom End. The crystal fabs for them obtain silicon from mines in Three Worlds, Herron's Nebula, and Antigone Memorial. Without that added script, this set up would be virtually impossible.

Going cashless is just an added bonus. I currently have 111 factories. The fact that I am cashless means I can easily scroll down my factory list and transfer cash out of any factory that has it. I don't have to make a decision on each one... do you have enough extra cash to transfer out... how much do I need to leave behind... I just suck it all out. Boom, done. I don't need to worry about how much to leave behind in any station. I don't need to worry about calculating lowest costs. The whole system becomes very simple.

I could use some of the station accountant scripts, but I much prefer it this way. One simple extra script to allow me to send my freighters precisely where I want, everything else almost literally falls into place.
You were warned... pirates will be hunted down like vermin.

Ex Turbo Modestum

Nemesi$
Posts: 120
Joined: Wed, 12. Nov 03, 19:05
x4

Post by Nemesi$ » Wed, 28. Jan 04, 21:14

I prefer using my modified financemanager to transfer credits from and to factories. And since Silicon Wafers cost 264 in production (remember the 11 for ECells?) I'll just making more money if the transport is buying the stuff at a AI-Mine. Also the ECells. If there's a SPP with full stock selling its cells at 9 my transports will fetch it and I will get some extra profit instead of buying their stuff from the chain all the time.
Die Zehn Gebote haben 279 Wörter, die amerikanische Unabhängigkeitserklärung hat 300 Wörter. Die EU-Verordnung zur Einfuhr von Karamelbonbons hat 25911 Wörter. [Bodo H. Hauser]

Nestan
Posts: 268
Joined: Wed, 3. Dec 03, 22:43
x3tc

Post by Nestan » Wed, 28. Jan 04, 21:22

@Nemesis - you have got it all wrong man, if you have an energy cell chain then the energy cells are FREE. As in they cost you ZERO, how can you think that buying energy cells at 9 credits is cheaper than ZERO credits. And the chain continues, if you are making Silicon with free energy then your silicon wafers are also FREE, which the last time i checked is far less than 264. The chaining continues increasing your profits as long as you are selling products to AI at more than one point on your chain. Like I have at least one more of every chain factory that i need that is set to sell to best buyer so that I can bring in AI credits into my chain. Give this a little bit of thought and you will see that there is no other method of factory managment that is even close to as sucessful. I quadrupled my income the day i setup my first chain. I went from saving up three days to buy a new TL to buying a carrier and a destroyer in the same day.

Locked

Return to “X Trilogy Universe”