Anyway, the old 125 Mw shield fabs made you use about 600,000 credits to build an 850,000 credit shield, and they took 8 hours and twenty minutes to complete a cycle. TOTALLY NOT worth it. This script mods them to use 1/2 the resources to produce the same shield normally (not dependant on secondary resources), and if you fill em up with 82 quantum tubes (as secondary resource - worth about 250K total) they will build them twice as fast: one at the BEGINNING of the cycle and one at the END of the cycle.
All these parameters are adjustable depending on whatever any modder dreams up.
Now this script is just a working example, I have currently made it just for Argon fabs, but with a simple If/then tree you could easily add in the other racial fabs and add the appropriate commodity.
Please pardon the title and some of the comments/variable names - I STILL dont know how to start a script of my own, so I have to gut another uncommon script and fill it with my code. Thanks to Gnowar and Francium de Neobie who wrote the original code that inspired this script.
Code: Select all
001 * Author - francium de neobie
002 * Check if we are running from a newly started game
003 @ if [THIS] -> call script 'libfdn.CheckPlayingTime' : name of script='Free 1MW Shield'
004 return -1
005 end
006 * Check if there are no previous instances, and get the pid if succeed
007 @ $pSignature = [THIS] -> call script 'libfdn.ScriptIsAlone' : Race=Race 2 Sector=Akeela's Beacon Ship Type=Xenon H
008 if not $pSignature
009 return -1
010 end
011
012 $FoodArray = array alloc: size=99
013 $i = 0
014 while $i < 99
015 $FoodArray[$i] = 0
016 inc $i =
017 end
018
019 * Begin the main loop
020 while [TRUE]
021 * Check if the current process is killed
022 if not $pSignature -> exists
023 return null
024 end
025 * All checks ok. First, get all player SSPs
026 $MySPPs = array alloc: size=0
027 $AllSSPTypes = array alloc: size=0
028 append Argon Shield Prod. Facility 125MW to array $AllSSPTypes
029 $nSSPTypes = size of array $AllSSPTypes
030
031 $i = 0
032 while $i < $nSSPTypes
033 $CurrentSSPType = $AllSSPTypes[$i]
034 @ $CurrentSSPs = [THIS] -> call script 'libfdn.GetAllStations' : Race=Player Sector=null Station Type=$CurrentSSPType
035 @ $temp = [THIS] -> call script 'libfdn.CombineArrays' : Array1=$MySPPs Array2=$CurrentSSPs
036 $MySPPs = $temp
037 $i = $i + 1
038 end
039
040 * Delete their primary crystal slot and create secondary crystal slot
041 $i = 0
042 $nSSPs = size of array $MySPPs
043 while $i < $nSSPs
044 $CurrentSSP = $MySPPs[$i]
045 if not $CurrentSSP -> uses ware Quantum Tubes as secondary resource
046 $CurrentSSP -> add second resource to factory: Quantum Tubes
047 end
048
049 * the o so difficult factory start checker
050 if $CurrentSSP -> uses ware Quantum Tubes as secondary resource
051 $x = $FoodArray[$i]
052 $y = $x - 4500
053 $z = $CurrentSSP -> get true amount of ware Meatsteak Cahoonas in cargo bay
054
055 if $z < $y
056 $CycleStart = [TRUE]
057 else
058 $CycleStart = [FALSE]
059 end
060
061 * resource regeneration upon the start of factory cycle
062 if $CycleStart == [TRUE]
063 $retvar = $CurrentSSP -> add 7500 units of Energy Cells
064 $retvar = $CurrentSSP -> add 2500 units of Meatsteak Cahoonas
065 $retvar = $CurrentSSP -> add 750 units of Ore
066
067 * enhanced production with a full load of quantum tubes.
068 * will only activate upon beginning of a start cycle
069 $Tubes = $CurrentSSP -> get true amount of ware Quantum Tubes in cargo bay
070
071 if $Tubes >= 82
072 $retvar = $CurrentSSP -> add 1 units of 125 MW Shield
073 $retvar = $CurrentSSP -> add -82 units of Quantum Tubes
074 end
075 end
076
077 $FoodArray[$i] = $z
078 $i = $i + 1
079 end
080
081 * Repeat cycle every 60 seconds
082 @ = wait 60000 ms
083 end
084 * For debugging
085 *write to player logbook $nSSPs
086 end
087 @ = [THIS] -> call script 'libfdn.EndCurrentInstance' : Race=Race 2 Sector=Akeela's Beacon Ship Type=Xenon H
088 return null
This works, I have tested it extensively. the key is to tie the detection to the rate limiting resource, and set the threshold such that it is too much to be feasible to tranport. In this case it is equivalent to DROP in 19 FULL Manta-loads of Meatsteaks. And if you are someone who is prone to cheating, you can just make the script check every 5 seconds instead of every 60, making it impossible to load the tranports fast enough to trick the script.
For the love of god, I hope I start seeing some real economy fix mods out there now.
TW