[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
BinarySecond
Posts: 5
Joined: Wed, 19. Jun 13, 15:15

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: 103
Joined: Tue, 19. May 09, 09:25

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: 20836
Joined: Sun, 2. Apr 06, 16:38

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.
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton

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

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, 18:03

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: 209
Joined: Sun, 18. Dec 11, 13:34

Re: Saturn complex bug?

Post by JDCollie » Thu, 11. Jan 18, 04: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: 209
Joined: Sun, 18. Dec 11, 13:34

Post by JDCollie » Thu, 11. Jan 18, 04: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: 211
Joined: Wed, 6. Nov 02, 21:31

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.

Post Reply

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