[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

X3:3X
Posts: 43
Joined: Wed, 12. Jan 11, 22:54
x3tc

Post by X3:3X »

How would i go about adding gazz's tfactories entries to the xtended one? i arent sure which cat/dat to edit.

X33X
CaptObvious
Posts: 114
Joined: Sun, 1. Mar 09, 19:53
x4

Post by CaptObvious »

I'm having an issue with CC on AP2.0 - the Tractor Beam item doesn't seem to exist in my game. I can run the crunch script manually but odd things happen (like it tries to put factories on top of one another so they rub together and gradually damage each other) and the factory container is invsible.

Any ideas what I've done wrong?
CaptObvious
Posts: 114
Joined: Sun, 1. Mar 09, 19:53
x4

Post by CaptObvious »

CaptObvious wrote:I'm having an issue with CC on AP2.0 - the Tractor Beam item doesn't seem to exist in my game. I can run the crunch script manually but odd things happen (like it tries to put factories on top of one another so they rub together and gradually damage each other) and the factory container is invsible.

Any ideas what I've done wrong?
I just used the cheat script to remove previous traces and add the vanilla stations back in and ran the script again, this time specifying null for the first argument (which station to crunch) and a position for the second argument and it worked perfectly this time. Still no tractor beam though.
NovaStark
Posts: 12
Joined: Tue, 5. Jun 12, 03:47
x3tc

Post by NovaStark »

*edit* TL:DR - I've decided to cheat the roids in after all. I'm tired of trying to find the right mixture of location, roids, etc.

First of all, I gotta say I love your mods Gazz. Use Mars and a few of the smaller ones besides this one. I'm even using the safe undocking script on TC. lol. I saw your note about AP after I had installed it.

Anyways. My brain hurts. I've crunched two complexes with CC and I thought every thing was fine until I noticed my cags were having to pull more ore/silicon than I expected. I know there is supposed to be a reduction of a few percent but on this albeit smaller complex with only one large Ore and Silicon Mine I'm see far greater (28 and 23 yield respectively).

*edit* Yes, I know crunching such small complexes doesn't mean much. I just prefer your borg cubes to even small messy complexes that invite issues IS.

Math time.
INT(600/(28+1))+1 = 21
INT(59.9/21)+1 = 3
Cycle time = 63
Products/Cycle = 15
Prod/Hr = 857.14 Ore/Hr

Crunched to 2 x Fact producing a total of 12 ore every 60 secs. Giving me 720 Ore/Hr.

INT(2400/(23+1))+1) = 101
INT(59.9/101)+1 = 1
Cycle Time = 101
Products/Cycle = 5
Prod/Hr = 178.22 Silicon/Hr

Crunched to 1 x Fact producing a total of 4 silicon every 118 secs. Giving me 122 Silicon/Hr.

The silicon is the biggest difference at over 30% reduction. I tried to figure out how your calculating the output but I'm stumped.

I figured from the post you linked to the OT that you were adding up all the Prod/Hr of the mines being crunched dividing it by a fixed number of cycles to determine Products/Cycle of the Facts. The loss would be from the fact you would have to round down.

i.e. 178.22 / (3600 / 118) = INT(5.84) = 5 or 152.54 Silicon/Hr.

Of course maybe I'm making a mountain out of a mole hill because if I just over do it on the yield then the loss is basically irrelevant. I just was trying to wrap my head around it so I could plan better and not have to resort to tractor beaming roids from other sectors or using cheats to create them at high enough yield.

Though maybe I'm overlooking something. I still am relatively green to x3 in general. I played x3r for a bit but I've played x3tc a lot more. Even then it's only been a couple weeks.

Sorry, I'm just stubborn when I can't figure things out. ;)

When I'm not so tired I might have to try to make heads or tails of whats in the script. I messed with scripting in x3r more than I played the game itself but I've forgotten most of what I learned. I remember modifying one of the UT scripts to only allow the traders to enter sectors where I had an advanced sat with a particular string in the name. Then I modified a sat script to rename a sat if hostiles were detected. Therefore traders would dynamically avoid sectors with an enemy presence at the time. In theory it's more flexible then static sector blacklists or using race. Of course it doesn't help much if the hostiles show up after the trader has picked a stop. Ahem. I digress.

Anyhow if you have the time I'd like to know how exactly you calculate the production/hr of mines. Or even if you could tell me which script it's in so I don't have to find it myself.

Thanks man.
Turnus
Posts: 147
Joined: Mon, 14. May 12, 07:54
x4

Post by Turnus »

Can someone explain more clearly HOW this works? Do I place the factories in the sector then hit crunch command?

can I add a few at a time? (build 5 stations, crunch, then repeat) I barely have TCs system requirements so I can't build a massive complex (without using the kit) then crunch..
User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle »

Perhaps an example will help.

1) Load a TL with two or more factories. Can be same type or different types.

2) Send the TL to the sector where you want to build. Use CC "drop" to drop all factories at the same time. Select the module container (as the location) if you have one, or the approximate location of where you want to build the module container if you do not yet have a container.

3) Use CC "crunch" to crunch the factories. For the location, choose exactly where you want the module container. The module container can be several kilometers in each dimension, so position it well away from other obstacles.

Depending on the factories, you will now have one or more factory modules, all residing inside the module container. The module container will be created the first time that you crunch.

4) Now get some complex construction kits (CCK's) and use them to connect the factory modules together. The first time that you connect two modules together, you will be asked for another location... this is where you want the Complex Hub to be located. Choose a location as far from the module container as is practical; above or below the container is best (above or below depends on whether or not you also use Advanced Complex-Hub).

To add more factories, just drop and crunch again; always choosing the module container as the location. When you connect new factory modules, connect each module to the complex hub.

Does that help?
Aegyen
Posts: 245
Joined: Sat, 31. May 08, 19:33
x4

Post by Aegyen »

MUST have a tractor beam on board the ship you are running CC from...

Does not need to be installed in a gun mount, just present in the cargobay.
Turnus
Posts: 147
Joined: Mon, 14. May 12, 07:54
x4

Post by Turnus »

another question this is a "mod" so how can I use it with another "mod" like MARS turret script (i'm using Cycrows installer)
NovaStark
Posts: 12
Joined: Tue, 5. Jun 12, 03:47
x3tc

Post by NovaStark »

Turnus wrote:Can someone explain more clearly HOW this works? Do I place the factories in the sector then hit crunch command?

can I add a few at a time? (build 5 stations, crunch, then repeat) I barely have TCs system requirements so I can't build a massive complex (without using the kit) then crunch..
*Stuff deleted* Oops, looks like I refreshed the wrong page. Your question was answered already.

The only caveat is that if you intend to make a self sufficient complex you can run into some problems with your mines if you're not careful. Mines lose some production per hour when crunched (I'm guessing it's more pronounced on smaller complexes).

From what I've read you need to either use a higher than necessary yield roid to give yourself some breathing room or use a mobile mining setup to avoid mines altogether. Both have their pro's and con's.

In the former you can end up with a bigger complex than you intended because the added mine yield makes you go over your Ecell production and then it's just an evil circle as you need to add a little to all the supporting factories. However, if you're not on a budget and can find roids of the appropriate yield (or are ok with cheating them into existence) then it's business as usual. Set it and forget it as it were.

Mobile mining operations should be setup when OOS due to the risk of ships colliding with roids, so the lag issue doesn't come in to play. MM takes a sizable fleet of TS Miners, a TL, and some super freighters. So the initial cost can be higher if you weren't planning a large complex in the first place, but it scales much better than mines once you've paid for the TL. It can be a bit of a pain to setup and requires the use of some scripts. The risk of losing your mining fleet is a possibility as well if you don't choose the right sector or fail to put a protection force in place. But you can get some crazy amounts of Ore/Sil per hour done right and it's all Ecell free (well besides jump fuel for your freighters).

Personally, I decided to try out the later today. I remember doing MM in x3r on a much smaller scale than this.
Turnus wrote:another question this is a "mod" so how can I use it with another "mod" like MARS turret script (i'm using Cycrows installer)
Afaik Mars does not require a mod installation unless you already have another mod that messes with the vanilla weapons in game. I just dropped in the scripts and t's for Mars. That said if you do have more than one mod (not scripts mind you) you'll have to install them as fake patches to get them to play nice with each other. I'm no expert tbh. I installed CC as a fake patch just in case I do install another mod in the future.

If a mod or script comes in SPK I think cycrows installer will handle the fake patching for you. But honestly I prefer it when things are just zipped up and require you to install it manually. Learning about this stuff makes it easier to find problems on your own ;)

*edit* lawl. I'm glad I backed everything up beforehand to be safe. I just installed a the enhanced equipment dock mod and a couple other scripts and all my crunched complexes exploded. Well, not literally. I thought it would be fine as Gaaz stressed he doesn't touch anything but factories and the posts for both mods didn't seem to indicate they altered the same files.

Anyways, they all lost their connections and most of the complex hubs vanished too. At first I thought maybe it was just a minor bug or that the eEQ mod also installed the enhanced complex hub mod (same author). So I started reconnecting things. That's when I noticed that some of the FACTs weren't blinking yellow so I looked and found that all the production/resources got borked as well. Every single FACT was self sufficient. All resources became products and they were only left with energy as a resource. The ones that had some Ecells left continued to function happily. Well, assuming they produced more Ecells than they consumed I suppose.

This is probably a known bug/conflict, but I just had a good laugh about it. I'll be removing the fake patch and the scripts and since I don't have any save games with it installed I should be fine. Sorry, but CC > eEQ for me.

*edit2* Oops, my bad. When I quit the game it occurred to me that I hadn't restarted after installing the eEQ mod. I'm assuming Cat/Dat's only get read when the game launches because so far my complexes are still in one piece. Hopefully I won't get another incoming message from my trade run M5's complaining that the station disappeared. lol. *crosses fingers*
Turnus
Posts: 147
Joined: Mon, 14. May 12, 07:54
x4

Post by Turnus »

okay so how do i turn the mods into fake patches?
Aegyen
Posts: 245
Joined: Sat, 31. May 08, 19:33
x4

Post by Aegyen »

This is on Page 1 of this thread, in the very first post:

To install the mod as a "fake patch":
mods\Complex Cleaner.CAT + .DAT files must be placed in your X3 folder and renamed so that their numbers seamlessly follow the existing CAT/DAT files in there and end up as the highest number.

Right: Cat/Dat 10, 11, 12, 13
Wrong: Cat/Dat 10, 11, 12, Complex Cleaner

If you do select mod package at the X3 launcher window, this mod overrides all fake patches.
Use this feature with caution.
If you are playing TC this is in the X3 Terran Conflict folder, if you are playing AP they go in the /addon folder, which is in the X3 Terran Conflict folder.
Etyneo
Posts: 253
Joined: Fri, 25. May 12, 00:21
x4

Post by Etyneo »

I'm probably not using this thing correctly, but I figure I'll post to see if any useful suggestions crop up...

Before installing this mod/script, I had a 60+ structure complex build and connected. I'd used a single layer, thus resulting in the 'plex taking up a large chunk of the sector at the vertical level I'd set it at.

In preparation for this script, I used Cycrow's cheat thing to select the hub and 'destroy' it. This resulted in the stations within the complex becoming disconnected (every one showing up in the list, no visible tubes, etc...not that the tubes were visible once this mod went into effect...)

I was also in the middle of constructing a new complex, but hadn't even set up the first CCK for it yet, so those stations had never been connected.

When I hit crunch the first time (after ignoring each of my mines and the HQ), it set up the cube, but only crunched the stations from my unfinished complex. It didn't do anything to the ones that had been de-complexed, even though they appear to be separate and otherwise unconnected now.

Any ideas as to a solution?

EDIT: Forgot to mention that subsequent crunches resulted in no stations being crunched, even though I had stations there to be crunched.... I should get some sleep now...
Aegyen
Posts: 245
Joined: Sat, 31. May 08, 19:33
x4

Post by Aegyen »

Etyneo wrote:I'm probably not using this thing correctly, but I figure I'll post to see if any useful suggestions crop up...
You have it all right, you just missed 1 more command option (it was near the bottom of the page):
restore : All unconnected Fabs are recalled.
This will be necessary when a hub is destroyed.
The destination is either a complex hub or if none is supplied, the position.
Only about 70 Fabs can be recalled at one time because huge safety margins are required to place objects like SPP XL or mines.
Etyneo
Posts: 253
Joined: Fri, 25. May 12, 00:21
x4

Post by Etyneo »

That worked, thanks. Problem was it also moved my mines...too close together...almost lost one... :/ Now for the long repair grind...
Etyneo
Posts: 253
Joined: Fri, 25. May 12, 00:21
x4

Post by Etyneo »

Anyone know offhand if you can add to one of these after you've set up the complex hub? Or do I have to put in everything I want before connecting everything?
Aegyen
Posts: 245
Joined: Sat, 31. May 08, 19:33
x4

Post by Aegyen »

Etyneo wrote:Anyone know offhand if you can add to one of these after you've set up the complex hub? Or do I have to put in everything I want before connecting everything?
Right on the front page there.. :P
If this command is run for the first time, the Module Container is built at the position you supplied.
Watch where you build it. This thing is huge and it is unlikely you can ever move it again.
On subsequent crunch runs the position argument is ignored and the Factory modules automatically added to an existing Module Container.
With Gazz scripts, you really have to read the manuals, and/or 1st posts. AND, keep them handy for reference, for a little while.

His scripts will do about everything you can think of, when it comes to a certain feature. And they are usually feature rich.

What was the old commercial?.. "It slices, it dices... "
zhukov032186
Posts: 125
Joined: Sat, 18. Feb 12, 05:21
x3tc

Post by zhukov032186 »

"And if you order now, we'll throw in a second set * free!"

[* of glow-in-the-dark thumb warmers - Gazz]
Vayde
Posts: 850
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde »

Is there any particular reason you made the containers so big?

Could another station model be used or one created to replace all of the current units without screwing up the math involved in the crush?
Still life in the old dog yet...
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Common sense.
While you can crunch 1500 factories into a "container" the size of a regular cargo crate, I think that this looks rather odd.

You could assign any other station model, a ship or bullet model, nothing at all...
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Vayde
Posts: 850
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde »

Yes I agree that common sense would play a big part in your reasoning for making such a large object.

As a complex hub can be attached to it for docking purposes then it could not be defined as a Dock or Trading station?
Still life in the old dog yet...

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