<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.starbasegame.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lachesis</id>
	<title>Starbase wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.starbasegame.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lachesis"/>
	<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Special:Contributions/Lachesis"/>
	<updated>2026-04-20T15:13:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=29901</id>
		<title>Common YOLOL</title>
		<link rel="alternate" type="text/html" href="https://wiki.starbasegame.com/index.php?title=Common_YOLOL&amp;diff=29901"/>
		<updated>2021-12-09T03:01:02Z</updated>

		<summary type="html">&lt;p&gt;Lachesis: /* Tweakable Generator Script */ Unified and cleaned up various tweakable fuel rate scripts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A collection of small common scripts meant to be easily copied and understood for the [[YOLOL]] beginner.&lt;br /&gt;
&lt;br /&gt;
''This page is a WIP. Please contribute to it! (Avoid complex scripts and the renaming of fields.)''&lt;br /&gt;
&lt;br /&gt;
==[[Fuel chamber]]==&lt;br /&gt;
Ships will require enough batteries to act as a buffer for the generator spool up time.&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;Standard&amp;quot; Generator Script===&lt;br /&gt;
 :FuelChamberUnitRateLimit=100-:StoredBatteryPower/100 goto 1&lt;br /&gt;
&lt;br /&gt;
Makes the fuel chambers' rate limit follow the battery charge inversely.&lt;br /&gt;
''&amp;lt;br/&amp;gt;Note: The [[Laborer Module]] ship rewarded during the tutorial has these fields renamed by default to: &amp;lt;code&amp;gt;Generator&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Battery_1&amp;lt;/code&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
===&amp;quot;Alternative&amp;quot; Generator Script===&lt;br /&gt;
&lt;br /&gt;
An alternative script that will keep the batteries fuller.&lt;br /&gt;
&lt;br /&gt;
 :FuelChamberUnitRateLimit=1000-:StoredBatteryPower/10 goto 1&lt;br /&gt;
&lt;br /&gt;
===Settable on/off Generator flag===&lt;br /&gt;
 c=(c&amp;lt;1)*(:Battery_1&amp;lt;5000)+c*(:Battery_1&amp;lt;9999) :Gen=c*22+0.001 goto 1&lt;br /&gt;
Fitting this code on the Laborer Module requires renaming at least one device. (here the Generator was renamed Gen) &lt;br /&gt;
&lt;br /&gt;
5000 and 9999 are the start-charging and stop-charging levels. 22 is just enough charge to run the stock two box thrusters.&lt;br /&gt;
&lt;br /&gt;
===Tweakable Generator Script===&lt;br /&gt;
&lt;br /&gt;
This script is tweakable to your ship configuration and also by an on/off button and/or override lever. Field renamings are those of the default Laborer, except for the :FCRL field. This field needs a new name so that the script can control the fuel rate, instead of the Generator button.&lt;br /&gt;
&lt;br /&gt;
 MaxBattery=20000           // total capacity&lt;br /&gt;
 LowBattery=0.99*MaxBattery // start charging below 99%&lt;br /&gt;
 MinBattery=0.20*MaxBattery // max charge rate below 20%&lt;br /&gt;
 MaxGenerator=100           // max fuel rate&lt;br /&gt;
 MinGenerator=2             // min fuel rate (near 100% charge)&lt;br /&gt;
 h=MaxGenerator c=MinGenerator          // auxiliary variables,&lt;br /&gt;
 f=MaxBattery l=LowBattery e=MinBattery // no need to change these&lt;br /&gt;
 r=(h-c)/(f-e) z=h-r*l a=r*(f-l)      // reboot: remove &amp;quot;goto9&amp;quot; briefly&lt;br /&gt;
 y=:Generator-z-r*(:Battery_1+:Battery_2)+c*(y&amp;gt;c)+a*(y&amp;gt;0) :FCRL=y goto9&lt;br /&gt;
&lt;br /&gt;
It is assumed that specific YOLOL fields are renamed:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Renamed fields&lt;br /&gt;
|-&lt;br /&gt;
! Ship Part !! Old YOLOL field name (Laborer in parenthesis) !! New YOLOL field name &lt;br /&gt;
|-&lt;br /&gt;
| On/Off Button || ButtonState (Generator) || Generator &lt;br /&gt;
|-&lt;br /&gt;
| First Battery || StoredBatteryPower (Battery_1) || Battery_1&lt;br /&gt;
|-&lt;br /&gt;
| Second Battery || StoredBatteryPower (Battery_2) || Battery_2&lt;br /&gt;
|-&lt;br /&gt;
| Fuel Chamber || FuelChamberUnitRateLimit (Generator) || FCRL&lt;br /&gt;
|-&lt;br /&gt;
| Override Lever (optional) || LeverState || Generator &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
It is assumed that specific YOLOL fields have the specific values below. The on/off button is already set up in the basic laborer.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Fixed field values&lt;br /&gt;
|-&lt;br /&gt;
! Ship Part !! YOLOL field name !! Fixed field value (Laborer default in parenthesis)&lt;br /&gt;
|-&lt;br /&gt;
| On/Off Button || ButtonOnStateValue|| 100 (100)&lt;br /&gt;
|-&lt;br /&gt;
| On/Off Button || ButtonOffStateValue|| 0 (0) &lt;br /&gt;
|-&lt;br /&gt;
| On/Off Button || ButtonStyle || 1 (1)&lt;br /&gt;
|-&lt;br /&gt;
| Override Lever (optional) || LeverMinOutput || 0 &lt;br /&gt;
|-&lt;br /&gt;
| Override Lever (optional) || LeverMaxOutput || 200 &lt;br /&gt;
|-&lt;br /&gt;
| Override Lever (optional) || LeverCenteringSpeed || 0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==[[Flight control unit]]==&lt;br /&gt;
&lt;br /&gt;
===Slow Mode===&lt;br /&gt;
Requires to modify the lever bound to '''&amp;quot;FcuForward&amp;quot;''' which shall be renamed '''&amp;quot;Fwd&amp;quot;''' and a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Slow&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. This script is useful when you need more manoeuvrability but have too much forward thrust (e.g. while mining or docking).&lt;br /&gt;
''Note: Replace '''&amp;quot;X&amp;quot;''' with the number you want to substract from the percentage rate of your main thrusters. Example: A &amp;quot;X&amp;quot; of 80 means you'll have 100-80=20% of maximum thrust.''&lt;br /&gt;
 :FcuForward=:Fwd/100*(100-(X*:Slow)) goto1&lt;br /&gt;
&lt;br /&gt;
===Single Forward/Backward Lever===&lt;br /&gt;
Requires a center lever bound to '''&amp;quot;FcuForward&amp;quot;'''.&lt;br /&gt;
 :FcuBackward=-:FcuForward goto1&lt;br /&gt;
''Note: Eventually you might want to modify forward and backward individually (e.g. slow mode), in which case you'll need a lever unbound to any instead (name it '''&amp;quot;FwdBwd&amp;quot;'' for example) and 2 YOLOL chips.''&lt;br /&gt;
 :FcuForward=:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
 :FcuBackward=-:FwdBwd goto1&lt;br /&gt;
&lt;br /&gt;
==[[Material point scanner]]==&lt;br /&gt;
&lt;br /&gt;
===Material Point Scanner Script===&lt;br /&gt;
Requires 2 displays for '''&amp;quot;Material&amp;quot;''' and '''&amp;quot;Volume&amp;quot;''', 2 buttons to toggle '''&amp;quot;Active&amp;quot;''' and '''&amp;quot;Scan&amp;quot;''' and a third one with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Next&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''.&lt;br /&gt;
 :Index=(:Index+:Next)*(:Index&amp;lt;:ScanResults) :Next=0&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
===Automatic Material Point Scanner Script===&lt;br /&gt;
This is a modified version of the above script so it can be used when the scanner is '''&amp;quot;Active&amp;quot;''' without the need of any additional buttons.&lt;br /&gt;
''Note: launching a new scan reinitialize the index to '''&amp;quot;0&amp;quot;'''.''&lt;br /&gt;
 :Scan=1&lt;br /&gt;
 //Pause&lt;br /&gt;
 :Index=Next&lt;br /&gt;
 Next=(Next+1)*(Next&amp;lt;:ScanResults)&lt;br /&gt;
 :Material=:Material :Volume=:Volume goto1&lt;br /&gt;
&lt;br /&gt;
==[[Mining laser]]==&lt;br /&gt;
&lt;br /&gt;
===Pulsed Mining Laser===&lt;br /&gt;
Requires a button with '''&amp;quot;ButtonState&amp;quot;''' renamed '''&amp;quot;Mining&amp;quot;''' and '''&amp;quot;ButtonStyle&amp;quot;''' set to '''&amp;quot;1&amp;quot;'''. Reduces power consumption by continuously switching mining laser &amp;quot;on&amp;quot; and &amp;quot;off&amp;quot; while the button is active.&lt;br /&gt;
 :MiningLaserOn=(1-:MiningLaserOn)*:Mining goto1&lt;br /&gt;
&lt;br /&gt;
===Configurable Pulsed Mining Laser===&lt;br /&gt;
Similar to the previous script but with configurable timers for the &amp;quot;on&amp;quot; and &amp;quot;off&amp;quot; phases of the laser.&lt;br /&gt;
''Note: Each phase is calculated in number of YOLOL &amp;quot;tick&amp;quot; (0.2sec). Replace '''&amp;quot;X&amp;quot;''' with the duration of &amp;quot;on&amp;quot; and '''&amp;quot;Y&amp;quot;''' with the duration of &amp;quot;off&amp;quot;. Example: A &amp;quot;X&amp;quot; of &amp;quot;3&amp;quot; means the &amp;quot;on&amp;quot; phase will last 3*0.2=0.6sec.''&lt;br /&gt;
 On=X Off=Y :MiningLaserOn=(T&amp;lt;On)*:Mining T++ T*=T&amp;lt;(On+Off) goto1&lt;br /&gt;
&lt;br /&gt;
==[[Navigation receivers]]==&lt;br /&gt;
&lt;br /&gt;
===Received Signal Display===&lt;br /&gt;
Requires a text panel with '''&amp;quot;PanelValue&amp;quot;''' renamed '''&amp;quot;Nav&amp;quot;'''. &lt;br /&gt;
 if :SignalStrength&amp;gt;0 then goto2 else :Nav=&amp;quot;No Signal&amp;quot; goto1 end&lt;br /&gt;
 :Nav=:Message+&amp;quot;\n&amp;quot;+(1000000-:SignalStrength)/1000+&amp;quot;km&amp;quot; goto1&lt;br /&gt;
&lt;br /&gt;
==[[Ship transponder]]==&lt;br /&gt;
&lt;br /&gt;
===Leaving Safezone Warning===&lt;br /&gt;
Requires an active transponder and either a warning button or a safety lid button.&lt;br /&gt;
 :ButtonEnableBlink=1-:InsideSafeZone goto1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Networks|Common YOLOL]]&lt;/div&gt;</summary>
		<author><name>Lachesis</name></author>
	</entry>
</feed>