X3 Complex Builder

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

User avatar
assemblerbot
Posts: 80
Joined: Sun, 11. Feb 07, 21:18
x3tc

X3 Complex Builder

Post by assemblerbot » Mon, 7. Sep 09, 13:02

X3 Complex Builder

Latest version: v1.0.1
Last change: 2012-01-08

Download: X3 Complex Builder

Help is included. If you have any problems, questions or suggestions just ask me in this forum or let me know if you like it. I hope you enjoy the program, have a nice .. factory-loops :-)

Version history
-----------------
v1.0.1 - improved user interface (I hope it will work for everyone)
v1.0 - added new sectors + sector from DLC pack, improved basic functions (auto load, save settings, etc)
v0.006 - updated list of existing factories (added races)
v0.005 - added terran factories, maps for unknown sectors, sun intensity for SPPs, minor interface fixes
v0.004 - fixes in calculation, added settings page
Last edited by assemblerbot on Sun, 8. Jan 12, 19:15, edited 4 times in total.

User avatar
NUKLEAR-SLUG
Posts: 2345
Joined: Thu, 4. May 06, 13:20
x3tc

Post by NUKLEAR-SLUG » Mon, 7. Sep 09, 14:37

Looks nice, the way it does calculations seems a little off tho. I can build a single 1Mj shield complex for under 15 million, your calculator wants to build one at a cost of over 30 million.

User avatar
assemblerbot
Posts: 80
Joined: Sun, 11. Feb 07, 21:18
x3tc

Post by assemblerbot » Mon, 7. Sep 09, 15:05

Can you send me the list of factories in your complex pls? .. I can't imagine how can you do that :) .. I've played for a while with X3 - Terran Conflict: Online Complex Calculator and coudn't push the price of independent factory-loop under 30 millions. (We are still talking about factory-loop without need of any resources, right?)

BTW: I forgot to write to help, my program always uses L-sized mines. You can still use them as M-sized. But if you've build M-sized mine on rich asteroid you cannot change it and asteroid is wasted.

User avatar
NUKLEAR-SLUG
Posts: 2345
Joined: Thu, 4. May 06, 13:20
x3tc

Post by NUKLEAR-SLUG » Mon, 7. Sep 09, 15:49

SPP M
Crystal M
Cattle M x2
Cahoona M x2
Silicon L (25)
Ore L (5)
CCK x8

Would work just fine with a cahoona overproduction you could sell on.

User avatar
assemblerbot
Posts: 80
Joined: Sun, 11. Feb 07, 21:18
x3tc

Post by assemblerbot » Mon, 7. Sep 09, 16:14

Yes, it looks fine but you are producing only 120 crystals per hour and your SPP needs 135.85 per hour. But still - it is interesting idea to add something like 'starving coefficient' for some factories.

User avatar
Kor'ah
Posts: 3285
Joined: Wed, 25. Apr 07, 15:29
x3tc

Post by Kor'ah » Mon, 7. Sep 09, 16:28

Sadly it wants to close-loop everything. I centralize crystal production into 2-4 dedicated complexes. Infact these are the only true closed-loops I ever build. I can't tell your calc to ignore something, like crystals, and just give me the number needed per hour. Better yet, how many crystals the complex will require after energy is full. I don't fart around with e-cells much, it's all about the crystals.

Also, get the game asteroid data loaded into it. That way it can correctly pick what mines to build on what asteroids in the sector of choise. Unlike the online calc it's correct with ore mine production.

Edit: Plugging in my "US 7:16 Crystal Farm" into your calc confuses it slightly. Granted I'm trying to do things that are way beyond the calcs abilities.

Code: Select all

=== 1 error occured! ===

My existing factories:
 none

Foreign existing factories:
 none

New factories:
 1 x Boron Bio Gas Factory M (1 x 224,636 cr = 224,636 cr)
 72 x Boron Complex Construction Kit  (72 x 259,696 cr = 18,698,112 cr)
 22 x Boron Bio Gas Factory L (22 x 561,528 cr = 12,353,616 cr)
 1 x Boron Bofu Chemical Lab M (1 x 809,992 cr = 809,992 cr)
 6 x Teladi Silicon Mine L (6 x 905,688 cr = 5,434,128 cr)
 22 x Boron Bofu Chemical Lab L (22 x 2,024,976 cr = 44,549,472 cr)
 1 x Boron Crystal Fab M (1 x 2,973,516 cr = 2,973,516 cr)
 22 x Boron Crystal Fab L (22 x 6,622,236 cr = 145,689,192 cr)
 4 x Boron Solar Power Plant XL (4 x 17,607,360 cr = 70,429,440 cr)

Build mines on these asteroids:
 Ore:
 Silicon: 64, 64, 64, 64, 64, 5

Dependency on external resources:
 Silicon Wafers  Production:2477.320 Spending:4200.000 Total:-1722.680

Production:
 BoFu  Production:16800.000 Spending:16800.000 Total:0.000
 BoGas  Production:5600.000 Spending:5600.000 Total:0.000
 Crystals  Production:6720.000 Spending:2716.981 Total:+4003.019
 Energy Cells  Production:374943.406 Spending:361855.688 Total:+13087.711

Total cost:
 301,162,104 cr

Errors:
 Not enough silicon asteroids available for this complex!
It should be the following.

Code: Select all

12 x Boron Crystal Fab L
3 x Boron Crystal Fab M
12 x Boron Bofu Chemical Lab L
3 x Bofu Chemical Lab M
12 x Boron Bio Gas Factory L
3 x Boron Bio Gas Factory M
3 x Boron Solar Power Plant XL
6 x Teladi Silicon Mine L (64x5, 1x5) 
[X3] Guide to training CAG and CLS1&2 pilots
[X3T] Guide to training CAG and CLS1&2 pilots in Terran Conflict

The mercenary code
There is no right or wrong.
There is no good or evil.
There is only the will of the client, and how much they're paying.

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

Post by jlehtone » Mon, 7. Sep 09, 17:14

Kor'ah wrote:Sadly it wants to close-loop everything.
Complex math is form of art. Quite simple actually, yet very difficult to explain to a computer. Locking down some variables (like forcing close-loop) makes the rest easy to solve, but naturally the result is what you force is to be.

User avatar
NUKLEAR-SLUG
Posts: 2345
Joined: Thu, 4. May 06, 13:20
x3tc

Post by NUKLEAR-SLUG » Mon, 7. Sep 09, 17:48

assemblerbot wrote:Yes, it looks fine but you are producing only 120 crystals per hour and your SPP needs 135.85 per hour. But still - it is interesting idea to add something like 'starving coefficient' for some factories.
Yep, but in practice that minor crystal deficiency doesn't actually make a difference as the over production in energy cells more than covers the crystal shortfall. None of my complexes have ever had the 'extra' crystal fab attached that a lot of people think would be needed to make up the shortfall and they all work just fine.

If you could get your app to internally 'simulate' production runs it would be able to better decide if you actually needed additional stations or not and would be able to pick a more accurate fab layout.

As far as cheapest option goes your app is assuming Boron power loops are cheapest, (which they are) but it decides that without regard to what you're building. For example I could build a self-contained 2x Firestorm complex usng just Argon fabs for about 36Million. Your app wants to do it with Boron loops for over 50 million.

As for the issue with mines, perhaps it would be good if instead of calculating with the mines taken in to account it had an option to calculate and tell you how much ore you need to account for in mines. ie, tell you you need to provide 32 yields worth of ore to power the complex you're planning.

User avatar
assemblerbot
Posts: 80
Joined: Sun, 11. Feb 07, 21:18
x3tc

Post by assemblerbot » Mon, 7. Sep 09, 20:06

As jlehtone said it's almost impossible to calculate best complex without some fixed conditions. That's why I forced calculation to closed-loops and to use only L-sized mines.

But I know what do you mean and there are my answers:

- simulation is probably not needed I just add extra math to calculate calculate resource needs based on usage of products (if complex uses only 60% of factory production that factory needs only 60% of its resources), that should solve problems with crystals and minerals over production

- you are absolutely right I used boron power loops because they are cheapest and program doesn't calculate with other combinations - little bit harder but I think I can fix it

- showing mineral needs as mines and yield looks simple but actually is not. The problem is: 1x Ore mine M, yield 50 is different than 2x Ore mine M, yield 25 (second solution is more expensive but it produces more ore and needs more energy) .. so I'll try it.

Kor'ah: if you add some virtual 'existing' factories you can calculate opened factory-loop. In your complex is realy missing big amount of silicon wafers .. so you can add some virtual silicon mines to calculate complex. But there are still problems NUKLEAR-SLUG metioned above.

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

Post by jlehtone » Mon, 7. Sep 09, 20:32

assemblerbot wrote: - simulation is probably not needed I just add extra math to calculate calculate resource needs based on usage of products (if complex uses only 60% of factory production that factory needs only 60% of its resources), that should solve problems with crystals and minerals over production
I have a complex, (first ever complex, actually), which according to another calculator is 48,95 Wafers short per hour. But taking account the usage chains, that calculator estimates a shortage of 20,99 Wafers per hour.

However, in a loop the tracking of how empty or full interediate stocks do affect the whole is an iterative process that has to be continued until it converges. The calculator I've used does not go that far. X3R Calculator by exogenesis does a required "simulation", but even there one cannot set all side-conditions as in game.

The result is, that the Silicon will run out in that complex, unless the Crystal stock is full to begin with (while other stocks are in "equilibrium"). No tool that I've checked properly predicts the latter outcome. But, I need the tools only for trivial data handling. They do that quite fine.

Tricky? Not at all. Simple math. :goner:

User avatar
NUKLEAR-SLUG
Posts: 2345
Joined: Thu, 4. May 06, 13:20
x3tc

Post by NUKLEAR-SLUG » Mon, 7. Sep 09, 22:36

assemblerbot wrote: - simulation is probably not needed I just add extra math to calculate calculate resource needs based on usage of products (if complex uses only 60% of factory production that factory needs only 60% of its resources), that should solve problems with crystals and minerals over production

- you are absolutely right I used boron power loops because they are cheapest and program doesn't calculate with other combinations - little bit harder but I think I can fix it

- showing mineral needs as mines and yield looks simple but actually is not. The problem is: 1x Ore mine M, yield 50 is different than 2x Ore mine M, yield 25 (second solution is more expensive but it produces more ore and needs more energy) .. so I'll try it.
- Yep, off the top of my head that sounds like it would work.

- Power loops can be derived from any race so perhaps working out how many of a particular food resource are locked to the products being made (For example Firestorms are only made by Argon so cahoonas are a fixed requirement.) and then having a bit of math to work out whether it's better to add in extra cahoonas for an energy loop or go with something different. Might be hard to code but you know what the optimium solution is, it's just getting your app to be able to figure that out for itself.

- I'm aware there's some slight difference in resource usage for a 1x50 versus 2x25 ore mine but I don't know the exact figures. Again, I've always avoided the problem by having a slight overproduction. So if you know the exact figures I don't see why you couldn't calculate on a worst case scenario, add a small percentage over-requirement and generate an approximate minimum yield requirement. That should work I'd have thought.

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

Post by jlehtone » Tue, 8. Sep 09, 07:25

The OP's complex plan, which the OP's tool addresses, ... I would have approached it differently:
1. Calculate available Silicon as S-factory units.
2. Add equivalent amount of SPP.
3. "Surplus" energy (divided by four) is the amount of Forges it can support.
4. Check whether available Ore matches the need.

Two possible scenarios:
* There is less Ore (a very rare case), so the complex will have surplus energy. Either reduce size, or add non-Ore-based factories.
* There is more Ore Asteroids than needed. Pick only the ones you need.

But what if the number of (Weapon) Forges is less than desired? Choose another sector.
NUKLEAR-SLUG wrote:- I'm aware there's some slight difference in resource usage for a 1x50 versus 2x25 ore mine but I don't know the exact figures.
The exact numbers of Ore happen to make 1x50 exactly as fast as 2x25, which is not true for Silicon. Yield vs cycletime is a curve, but it is almost linear for higher Ore yields.

However, since there can be random delay (probably unintentional) between factory cycles, the ingame results can deviate tiny bits. Those delays are not in any hard numbers, so they are impossible to calculate.

User avatar
assemblerbot
Posts: 80
Joined: Sun, 11. Feb 07, 21:18
x3tc

Post by assemblerbot » Tue, 8. Sep 09, 15:45

New version is available (v0.001). I've changed a lot of thinks and added some settings. Link is the same:
http://www.assemblerbot.info/version_eng/x3.php

There are some of major changes:
- program can calculate with needed amount of crystals dependent on energy consumption (message about crystal dependency is still there but it's like warning)
- M-sized mines are allowed
- program can generate virtual asteroids as a help how much resources you need

I've changed also algorithm for selecting spp and crystal fabs so I hope it's better now.

User avatar
TTD
Posts: 10913
Joined: Sun, 6. Jul 08, 10:29
xr

Post by TTD » Wed, 9. Sep 09, 11:21

@jlehtone
However, since there can be random delay (probably unintentional) between factory cycles, the ingame results can deviate tiny bits. Those delays are not in any hard numbers, so they are impossible to calculate.
So does this mean it is better to over produce than have the minimum requirements?

User avatar
Kor'ah
Posts: 3285
Joined: Wed, 25. Apr 07, 15:29
x3tc

Post by Kor'ah » Wed, 9. Sep 09, 11:32

Not really. Just have the resource/intermediate wares pre-stocked to ~10% during complex startup. It can be several game weeks before something like jlehtone was describeing will catch up to you, if at all. Those timeing discrepancies can go both ways.
[X3] Guide to training CAG and CLS1&2 pilots
[X3T] Guide to training CAG and CLS1&2 pilots in Terran Conflict

The mercenary code
There is no right or wrong.
There is no good or evil.
There is only the will of the client, and how much they're paying.

Post Reply

Return to “X Trilogy Universe”