[Mod] Litcube's Saturn Complex Hub V0.99b

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

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

Post Reply
alphanerd4
Posts: 4
Joined: Mon, 22. May 17, 01:57
x4

Post by alphanerd4 » Thu, 15. Jun 17, 00:46

Hey guys,

Sorry to necro the thread, but I have a quick question regarding setting silicon, crystals, or ore as the output.

So, I set up one SCH set up for Ore Mine M, and I decided to do one for Silicon (Hub Plot, for stashing tons of it away), and I keep getting an error code that shows up on the bottom, it says "5" when I select a large silicon mine, and a "2" when I select the M mine. Same deal for the crystal fabs, and now for the Ore mines.

Vanilla other than this mod, added the scripts in the scripts folder, tfiles in the tfile folder, and renamed the cat and dat files to 14.

Able to buy them just fine, and had one SCH set up and rocking. Will let me calculate other wares just fine.

Lictube, you are fantastic with your mods! I'm playing through x3tc, and once I get done with this and x3ap, I'm planning on rocking your overhaul mod. Thanks so much!

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Fri, 16. Jun 17, 16:30

In case anyone is interested, I made an XRM compatibility patch for the Saturn Complexes, in AP. One has the station in Saturn 3 and one moves the station to Teladi Space (PTNI Headquarters), for your non-Terran/enemy Terran playthroughs; those pesky Teladi are able to get all the good outsourcing deals! :)

- Saturn Complexes Compatibility patch for XRM (Saturn 3)

- Saturn Complexes Compatibility patch for XRM (PTNI Headquarters)

Litcube, I hope you don't mind!

alphanerd4
Posts: 4
Joined: Mon, 22. May 17, 01:57
x4

Post by alphanerd4 » Sun, 18. Jun 17, 00:00

So, just in case someone else has the same issue, I figured it out. Look up how many products what the factory you're trying to use produces a turn, and then use a Saturn complex hub that is divisible by that number. I felt really stupid when I figured that out, so just wanted to share. Yay for producing tons of ore, silicon and crystals for the hub, and then for my missle plexes to get a fleet of bombers :twisted:

BinarySecond
Posts: 5
Joined: Wed, 19. Jun 13, 15:15
x3ap

Post by BinarySecond » Mon, 19. Jun 17, 11:59

Mythrantar wrote:In case anyone is interested, I made an XRM compatibility patch for the Saturn Complexes, in AP. One has the station in Saturn 3 and one moves the station to Teladi Space (PTNI Headquarters), for your non-Terran/enemy Terran playthroughs; those pesky Teladi are able to get all the good outsourcing deals! :)
Hey! That's pretty legendary of you to do this for people less capable :)

Mad props!

Mythrantar
Posts: 173
Joined: Fri, 17. Jun 05, 06:35
xr

Post by Mythrantar » Tue, 20. Jun 17, 12:29

I am glad you can use them, but all I did was take the advice of people far more knowledgeable that me and just implement it. The true kudos go to people like Litcube, Seraph Kaoru, and Megaburn! :)

BinarySecond
Posts: 5
Joined: Wed, 19. Jun 13, 15:15
x3ap

Post by BinarySecond » Tue, 20. Jun 17, 13:21

I saw their replies and I couldn't figure it out for vanilla AP so I gave up :)

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

Post by Marco Nero » Thu, 17. Aug 17, 17:45

Hello guys,

did not playing X3 for a while, but as always i'm back again on it :)

I just installed Lictube Universe (never play it, i was always on XRM), so i was looking that about some script to install before starting a game, but the download link of this is broked :)

Somebody maybe has an alternative link for me?

Thankyou in advance guys

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24950
Joined: Sun, 2. Apr 06, 16:38
x4

Post by X2-Illuminatus » Thu, 17. Aug 17, 18:27

The Saturn Complex HUB is already part of LU by default. See the respective wiki entry for reference.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

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

Post by Marco Nero » Thu, 17. Aug 17, 18:29

Thankyou Illuminatus, glad to see peoples are still always up here :)

Thanks for help :)

zeus9999
Posts: 8
Joined: Wed, 21. Aug 13, 06:03

Saturn complex bug?

Post by zeus9999 » Fri, 22. Sep 17, 19:04

i downloaded the saturn complex mod that someone posted that was supposedly ready for XRM, and it loads up fine, when i get to the saturn shipyard, all the stations inside all read "READTEXT" and then some number, did i do something wrong?

unit098
Posts: 1
Joined: Sat, 24. Dec 16, 17:03
x4

Post by unit098 » Sat, 21. Oct 17, 14:36

Hey i was wondering if i could get a download to the Saturn hub files separate to the rest of LU as i want to use my CODEA carrier command software
when the sun falls the true gods shall rise

JDCollie
Posts: 218
Joined: Sun, 18. Dec 11, 12:34
x3tc

Re: Saturn complex bug?

Post by JDCollie » Thu, 11. Jan 18, 03:38

zeus9999 wrote:i downloaded the saturn complex mod that someone posted that was supposedly ready for XRM, and it loads up fine, when i get to the saturn shipyard, all the stations inside all read "READTEXT" and then some number, did i do something wrong?
If it is the one on the previous page, that's a compatibility patch for the mod, not the mod itself.
Someone please make a transaction history mod. Please. (I'm begging you.)

JDCollie
Posts: 218
Joined: Sun, 18. Dec 11, 12:34
x3tc

Post by JDCollie » Thu, 11. Jan 18, 03:40

unit098 wrote:Hey i was wondering if i could get a download to the Saturn hub files separate to the rest of LU as i want to use my CODEA carrier command software
This is the download link from the Reddit post that was mentioned awhile ago: https://drive.google.com/file/d/0B2cE7f ... I4Y1E/view
Someone please make a transaction history mod. Please. (I'm begging you.)

wanderer
Posts: 278
Joined: Wed, 6. Nov 02, 20:31
x3tc

Problewms with sector with 400% sun

Post by wanderer » Fri, 30. Mar 18, 15:40

I am having some strange hang-ups when trying to calculate or build in a sector with 400% sun.
This goes for all factories. No script changes, I even started a new game on a fresh installation. Same problem.

Trying Suns 300% and 450% are working, so I assumed its a caculation error somehow. So I digged into the scripts...

And in script 'Lib.Cmd.SaturnCH.Console' there you have:

Code: Select all

...
569   
570   GetSuns:
...
579   $CycleTime = $Temp -> get production cycle time: account for secondary resources=[FALSE]
580   $ProductsPerCycle = $Temp -> get number of products per cycle
..
586   $Count = 0
>> 587   while $Time != $CycleTime
588   |inc $Count = 
589   |$Suns = $Count * 50
590   |gosub GetTimeFromSuns
591   end
592   endsub
...
GetTimeFromSuns:
* Requires Suns, ProductsPerCycle, Size
* Returns Time
...
$Multiplier = $ProductsPerCycle / $Size
$Multiplier = $Multiplier / 553
$Factor1 = ($Suns / 50)
$Time = [THIS]-> call script 'Lib.Math.FloatOp' : pi=2212 qi=239 Operator='d' ReturnFPN=[TRUE]
$Time = [THIS]-> call script 'Lib.Math.FloatOp' : pi=$Time qi=$Factor1 Operator='a' ReturnFPN=[TRUE]
$Time = [THIS]-> call script 'Lib.Math.FloatOp' : pi=$Time qi=2 Operator='s' ReturnFPN=[TRUE]
$Time = [THIS]-> call script 'Lib.Math.FloatOp' : pi=2212 qi=$Time Operator='d' ReturnFPN=[TRUE]
$Time = [THIS]-> call script 'Lib.Math.FloatOp' : pi=$Time qi=null Operator='int' ReturnFPN=[FALSE]
$Time = [THIS]-> call script 'Lib.Math.FloatOp' : pi=$Time qi=$Multiplier Operator='m' ReturnFPN=[FALSE]
...
Here you get the Products per Cycle and the Cycletime.

Now, when using suns 400%, the Subroutine to calculate a Cycletime for suns from 50% upwards, it fails into a endless loop!
This happens because, when stepping through the $Time calculations, $Time for 400% will be calculated as 144!
As we see in above code, the while loop compares $Time != $CycleTime. So, the caclculated Time 144 can never be 145 (from code line 579 $CycleTime)! This leads to an endless while.

To fix it, implement a check:

Code: Select all

...
while $Time != $CycleTime  
inc $Count
$Suns = $Count * 50
gosub GetTimeFromSuns:

if  $Time < $CycleTime
  break
end
...
With this change, its now working as intended...


Why it comes to this problem?
It's happening because of the $time as number float claculations and the indirect converting to integer afterwards.

Also, its never a good practice to compare numbers with != who are calculated/processed somehow. There's always the possibility of above shown problem. When doing so, always do some greater/smaller checks (or boundary checks) in such loops.

Unpleasant
Posts: 1
Joined: Sun, 10. Sep 17, 09:05
x4

Re: [Mod] Litcube's Saturn Complex Hub V0.99b

Post by Unpleasant » Sun, 9. May 21, 15:28

Love the fact that despite 20 pages of posts no one knows how to actually install this mod into vanilla X3AP.
And if they do, they certainly can't explain it.

Merge this... changes pointers to that, I have no idea what any of this secretive BS means and there certainly isn't any explanation in these 20 pages.

Change pointers in the setup file... really? no indication of what the pointers look like, what line they're on, what they're originally set to, nothing...

Does anyone have a working version of this mod for the latest AP they can upload with all the secretive BS done?

Post Reply

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