[MOD] Complex Cleaner v4.09 / Modular Complexes (TC 3.2 / AP 1.1)

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
GlassDeviant
Posts: 234
Joined: Sun, 4. Nov 12, 13:06
x3tc

Post by GlassDeviant » Mon, 13. Apr 15, 14:39

What I do is drag a few asteroids in from other sectors (Asteroid Relocator), combine them into a single one of each type (Asteroid Fusion) (don't go over 300 or you really start losing yield big time), and then install a single silicon mine and one ore mine.

Whether you include them in the crunch or not is a matter of aesthetics, I don't mind the big asteroid blob sticking out of the Complex Cleaner cube, it's as if the complex was built around and incorporating part of the asteroid, very "high sci-fi" in my book.

You can't really fix the calculations because the game code itself for asteroids is a bit wonky, you'd have to change it in the source code and recompile the X3AP.EXE or X3TX.EXE file. At least that's what I understand from my reading. Just make sure the yield is bigger than you really need and sell off the excess.
bibo ergo sum

link87
Posts: 7
Joined: Sun, 29. Mar 15, 00:08

Post by link87 » Mon, 13. Apr 15, 16:20

It's not really possible to fix the mine problem. It's not actually a bug but rather an artifact of how mines work compared to other factory type. The first page actually links to http://forum.egosoft.com/viewtopic.php? ... 02#2470402 to explain this.

I worked out some calculations to figure out what the necessary asteroid yield was pre-crunch to get the effective amount post-crunch. Then I decided it wasn't worth it and just leave the mines uncrunched. I recommend using the asteroid fusion mod as well either way because it will either allow you to more easily create the excess yields or reduce the number of mines you need in the end. Do note that asteroid fusion suffers a similar problem. Although accurate amounts for the yield will be produced, you do effectively lose some possible production that two or more mines would produce on the separate asteroids.

I forgot to mention there actually is a bug with other factory types. See my first post on here for details. That is only a problem in X3:AP I think, and should only result in additional resources being used/created, not less.

Grape
Posts: 78
Joined: Wed, 15. May 13, 11:26
x3ap

Post by Grape » Mon, 13. Apr 15, 16:45

Thanks for the head's up with regard's to the calculations folk's, I had actually read the linked post (read skimmed) so it didn't really sink in, my bad. I do also use the Asteroid Fusion Mod and again it's one that goes into every game though not the Relocator as I don't mind doing the little tow jobs, adds something for me to get it inch perfect :D

A quick question though, will the ignore function still work on the mines that are attached to a crunched complex when I at a later stage wish to crunch more stations into the already existing Modules?

GlassDeviant
Posts: 234
Joined: Sun, 4. Nov 12, 13:06
x3tc

Post by GlassDeviant » Mon, 13. Apr 15, 17:19

The thing about Asteroid Relocator is that you can move them to another system. Otherwise you only need Asteroid Fusion and Complex Cleaner. I personally move the two largest Silicon asteroids from Herron's Nebula to Antigone Memorial to give me a final single Ore asteriod of yield 232 and Silicon asteroid of yield 272 once I run Asteroid Fusion. Then I use Grax Remove Rocks to vanish the leftover pebbles.

The ignore function should work fine, but I try to plan my complexes such that I never need to alter them once completed. For example my Antigone Memorial complex has 60+ stations/factories/mines merged into a box so large I has to put it way out beyond the range of a triplex scanner. Anything more that I need can be built in a different sector, probably far enough away as to not interfere with the CLS/CAG traders attached to the first complex.
bibo ergo sum

GlassDeviant
Posts: 234
Joined: Sun, 4. Nov 12, 13:06
x3tc

Post by GlassDeviant » Mon, 20. Apr 15, 10:12

I'm hoping this is not a problem with Complex Cleaner, I can't see how it would be since nobody else seems to be having this problem. Has anyone seen anything like this before?

http://forum.egosoft.com/viewtopic.php?t=379633
bibo ergo sum

link87
Posts: 7
Joined: Sun, 29. Mar 15, 00:08

Post by link87 » Sat, 25. Apr 15, 03:47

Does anyone have complex cleaner installed in X3:TC that can confirm for me what their production count and cycle time is for crunched silicon and ore mines? I believe I have found a bug in X3:AP that causes an additional loss of 3.9% for ore/ice mines and 2% for silicon mines. These are losses beyond the expected loss due to fractional production values in a mine and are a bug in the scripts. I want to see if these numbers hold true for X3:TC as well.

Selected
Posts: 4
Joined: Thu, 11. Feb 10, 20:12
xr

Post by Selected » Mon, 4. May 15, 13:18

This script and litcubes universe would be a dream come true. I just love this script..

CassCE
Posts: 29
Joined: Tue, 11. Mar 14, 16:20
x3ap

Post by CassCE » Mon, 23. Nov 15, 22:57

Gonna go ahead and also note the same bug others have mentioned: crunched 1x factories aren't calculated properly.

I crunched three chip plants, along with various other facilities, and ended up with a 2x chip plant that's operating appropriately, and a 1x plant that's operating at 5x.

Obviously I was quite fine with 4 free chip plants; thankfully I had spare overhead to run them. My Silicon Wafers are running a small deficit because of it, so I'm having to use CLS to truck in extras. It will make for a rude surprise for people making tightly-tuned complexes, though.

Edit: Also, I've run across mentions of a "dump" or "uncrunch" command, but haven't seen it in the actual documentation. I have another complex that will be receiving major additions, so what's the actual command and usage? I gather you're supposed to shut down and empty the complex, destroy the hub, then use whatever the command is on the module?

tangostorm
Posts: 1
Joined: Sat, 26. Dec 15, 02:38

Post by tangostorm » Sat, 26. Dec 15, 02:44

I am sorry to say that, but I have never seen such terrible "documentation" on how to use a mod. It is not clear at all. Just a mini tutorial would be enough. It a real pain the beginning with this mod

SirNukes
Posts: 405
Joined: Sat, 31. Mar 07, 23:44
x4

Post by SirNukes » Fri, 22. Jan 16, 07:38

I too ran into the overproducing 1x factory bug. After some digging into X3 modding, I narrowed down the problem. My apologies if someone already revealed this earlier in the thread; I only read the last few pages. In short, the Tfactories file in this mod needs updating/debugging for the current version of AP.

Interestingly, the two downloads in the top post (Zip for manual install, and the packed version for plugin manager) have different versions of Tfactories, and both are problematic in different ways. The 'manual install' version appears to have just copied the TC version of Tfactories into the AP addon folder, and does not have the new AP Terran factories. The plugin manager version, which I was using and experienced the 1x bug with, was updated for the newer AP factories but has a mistake.

Specifically, CC for TC inserts its template modules (1x to 200x) on lines 455-464 of Tfactories, following a series of placeholder entries on lines 440-454 to act as a buffer against changes. The current AP base Tfactories includes entries all the way up to 455. In the plugin manager download of CC, the new AP factories appears to have just been pasted over top of the TC version of Tfactories. However, there wasn't enough buffer space to support this, and the smallest CC module (1x) on line 455 was overwritten with a Terran large ice mine.

Whenever CC crunches factories and tries to add a new 1x module, it actually uses the large (5x) ice mine as the template, creating an overproducing module. You can see evidence of this in the naming of the 1x factories in game, which use MI (mine) where the the other CC modules use TE (tech). To complicate matters further, the faulty 1x factories are treated as 5x for subsequently generating larger modules; for example, three Medium factories will get crunched into one 5x and one faulty 1x, which get immediately re-crunched into one 10x.

If you are using a mod which changes Tfactories, incorporates the CC modules, and is up to date for AP, then you probably aren't seeing this bug. Otherwise, you will need to fix the Tfactories file and update your savegame. After some hours sorting things out, here is the procedure I ended up using on my game:

1. (Optional) Back up your savegame.

2. (Optional) Start AP, load the save. CC will end up deleting your hubs connected to CC modules and then recrunching automatically, so in systems that have module containers you will want to set Ignore on the factories you want to leave untouched. If such a factory is already connected to a hub with other crunched modules, you may need to self-destruct the hub to be able to select the factory to ignore. For example, if you have a crunched complex to which you added un-crunched mines (for aesthetic or practical reasons), you need to break the hub and set ignore on the mines, otherwise they will get auto-crunched later. To set ignore, you have to travel to the system, target the factory, and use the ignore command (the popup selection prompt appears to do nothing).

3. Resave and quit AP.

4. Extract Tfactrories.pck found in 03.cat in the addon/types folder using X3 Editor 2 or some similar program, to obtain a ~458 line text file (the editor may add a couple comment lines). You can see that its last line is for the Terran large ice mine, SS_FAC_TR_ICE_PL_1.

2. Open the Tfactories in the CC cat file with the text viewer, scroll to the bottom, copy the ~38 lines for the CC modules and placeholders (they all have GAZZ in their name), and paste them to the bottom of the Tfactories from step 1. For the plugin manager version, use Tfactories from /types and not addon/types, since the latter is missing CC factory entries. For the manual install version, Tfactories from either .cat should work.

3. At the top of your Tfactories, adjust the number of factories appropriately (eg. from 455 to 493), as described in the top post of this thread.

4. Save your new Tfactories back into the CC .cat file into addon/types, compressing it back into a .pck file.

5. Open setup.plugin.gz.CmpClean.xml in your addon/scripts folder using a text editor, scroll down to line 339, and change the version number from 409 to 410. This is required to trigger an in-game update, which will load in your fixed Tfactories correctly to the CC data tables stored in your save game. After conversion, you can change the version back to 409 if you like.

5. Load up AP and your save game and wait.


What to expect:

After a few seconds, a message should popup indicating CC was installed/updated successfully. This message will include the last line number in Tfactories where a CC module was found. Before the changes, this line was ~477. After changes, the line should be ~492.

Some seconds later, a series of crunch reports will appear for your systems with CC modules. The hubs attached to these modules will be gone. Resources that were in the hubs are distributed across the modules, money in the hubs is returned to the player account, and docked ships should have been undocked. Unfortunately, you will need to reconnect the modules and set your complexes back up.

Existing faulty 1x modules (produced at 5x) will have been replaced with the fixed 1x modules (produce at 1x). You may also notice that the 1x factories now use TE in the name instead of MI.

This will not fix any larger modules that were the result of crunching the faulty 1x factories, such at the three mediums to 10x example from earlier. However, any crunches on the new, fixed 1x factories should work correctly.


I know this thread is getting a little older, but hopefully those still playing will find this post helpful. Except for the bug, I love this mod.

Baldamundo
Posts: 76
Joined: Sat, 21. Jun 08, 18:46
x4

Post by Baldamundo » Sat, 9. Apr 16, 18:43

Is there any way of restoring the tubes?

Marco Nero
Posts: 148
Joined: Tue, 19. May 09, 09:25
x3

Post by Marco Nero » Fri, 7. Oct 16, 13:03

Hi all guys i have a little problem here. AP 3.1+XRM.

In the main forum Instructions, there is writed exactly: "for major mods, make a manual install: put "Script" and "T" folder into "Addon" folder, then put the .CAT/.DAT files to a lower number then XRM." Ok.

After downloaded the Complex Cleaner 4.09 Repacked for Plugin Manager for TC and AP 3.x , i opened the .txt instruction, and there is writed: "for major mods, make a manual install: put "Script" and "T" folder into "Addon" folder, and DO NOT put .CAT/.DAT files.


Which is the right thing to do with major mods like XRM?

I tried putting .CAT/.DAT files at lower number then XRM, but when i crunched them i see the Jonferco Showrooms disappearing from the map :) I eliminated the .cat/.dat files and used only script and t folder of the repacked version, but when i click on "crunch" i do not see any big complex, just a little squadre :) I think the installation has been corrupted by a wrong installation of the mod, so i'm asking how to procede in the right way :) Thankyou guys

Marco Nero
Posts: 148
Joined: Tue, 19. May 09, 09:25
x3

Post by Marco Nero » Fri, 7. Oct 16, 17:30

Ok i found solution i will post here so maybe can help someone else.

I downloaded "Complex Cleaner 4.09 Repacked for Plugin Manager for TC and AP 3.x" not repack for XRM couse the download link is no more available.

You HAVE to do a manual installation, if you install it with plugin manager it will place .CAT/.DAT files at the last position. I just tried it so i can sure you it's so.

Put "Script" and "T" folder in your "ADDON" folder (the folder of Albion Prelude), then, yes, you HAVE to install the .CAT/.DAT too and in the lowest number of XRM.

Watch out couse in the installation .txt there is writed "do not use .cat/.dat files for major mods, just install the scripts and t".

Enjoy you all :)

BlackArchon
Posts: 1004
Joined: Wed, 4. Feb 04, 18:37
xr

Post by BlackArchon » Fri, 7. Oct 16, 18:22

This is also described in the XRM FAQs, it's the third post in the XRM thread.

Marco Nero
Posts: 148
Joined: Tue, 19. May 09, 09:25
x3

Post by Marco Nero » Fri, 7. Oct 16, 23:59

You are absolutelly right, but when go to download the script/mod you can see that the XRM scipt/download is not more available for download and you have to download the tc+ap 3.x. inside of that there are 4 files: "scipt", "t" , .cat/.dat/ files and an instruction .txt that explain how to install. In this .txt there is writed "if you are using major mods like XRM do not install .CAT/.DAT files, just make a manual installation and do not put .CAT/.DAT.

For make CC on AP+XRM working again i had to install "Script" +"T" + .Cat/.Dat" files togheter and my problem was solved.

I do not know why other times (other gameplays, before i re-started the game) i had no problem simply installying manually "Script" and "T" without placing .CAT/DAT (like in the video with my 250 stations crunched without problems and withous .CAT/Da. but this time i had to install Cat/.Dat too, there is something i dont understand, I readed on this post "i think if you are running XRM you do not need .Cat/.Dat files" but i had problem this time, and i solved using .Cat/.Dat files,. Maybe i forget something but i did the same installation process :)

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”