Stationeers

Stationeers

Not enough ratings
(Formerly) The Best LArRE
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
257.908 KB
11 Jul, 2024 @ 3:28pm
20 Jul, 2024 @ 3:38am
4 Change Notes ( view )

Subscribe to download
(Formerly) The Best LArRE

In 1 collection by Wilhelm W. Walrus
Some Good Stuff
11 items
Description
This (was) literally THE best LArRE script​.

Unfortunately, they changed how LArRE works.

It will handle all the chute bins and even a growlight. It can of course handle fertilizer, and the housing displays the growlight cycle time in minutes. The device stack is very easy and very flexible, allowing for chutes to be between pots in the stack without requiring the user to define the junction index, as it is implied from the stack position (sp).

If you want to learn more about mips to do this yourself, check out this guide.

alias larre d0 alias seedBin d1 alias fertBin d2 alias outBin d3 alias growLight d4 define seedBinMark HASH("Seed") define fertBinMark HASH("Fert") define outBinMark HASH("Out") push HASH("pot0") #push corresponding device names onto stack starting from junction 0 push HASH("pot1") #YOU MUST ALSO push the three 3 Mark vals above somewhere on the stack push HASH("pot2") push HASH("pot3") push HASH("pot4") push HASH("pot5") push HASH("pot6") push HASH("pot7") push seedBinMark push fertBinMark push outBinMark define minutesOfLight 10 #define these to the optimal values for your plants. define minutesOfDark 5 define potID HASH("StructureHydroponicsTrayData") alias stackSize r15 alias pot r14 alias seedPos r13 alias fertPos r12 alias outPos r11 alias timer r10 alias offTime r9 alias totalTime r8 mul offTime minutesOfLight 120 #calculate growlight cycle tick values floor offTime offTime mul totalTime minutesOfDark 120 floor totalTime totalTime add totalTime totalTime offTime move stackSize sp pop r0 #iterate through stack once to compute bin junction positions brne r0 seedBinMark 2 move seedPos sp brne r0 fertBinMark 2 move fertPos sp brne r0 outBinMark 2 move outPos sp brgtz sp -7 l timer db Setting #get housing timer value to prevent light stress during modifications mul timer timer 120 floor timer timer IterateStackDevices: move sp stackSize #start iterating through all the devices on the stack CheckNextDevice: pop pot beq pot seedBinMark CheckNextDevice beq pot fertBinMark CheckNextDevice beq pot outBinMark CheckNextDevice lbns r0 potID pot 0 Occupied Maximum bnez r0 SkipPlant #skip planting if slot occupied ls r0 seedBin 0 Occupied beqz r0 SkipPlant #skip planting if no seeds in bin s larre Setting seedPos #otherwise, jal SendLarreToTask #send larre to the seed bin, jal DoAtTray #then back to the tray SkipPlant: lbns r0 potID pot 1 Occupied Maximum bnez r0 CheckHarvestable #handle fertilizing like planting ls r0 fertBin 0 Occupied beqz r0 CheckHarvestable s larre Setting fertPos jal SendLarreToTask jal DoAtTray CheckHarvestable: lbns r0 potID pot 0 Seeding Minimum blez r0 Iterate #skip harvesting if plant not seeding ContinueHarvest: lbns r0 potID pot 0 Mature Minimum #keep harvesting while mature blez r0 Iterate #end harvest when no longer mature jal DoAtTray #otherwise, harvest tray, s larre Setting outPos #then go deposit in the export bin jal SendLarreToTask s outBin Open 0 #afterward, close bin to clear slot and export item j ContinueHarvest #then check again to see if there is more to harvest Iterate: bgtz sp CheckNextDevice #check next tray in stack when all is handled yield #wait, and then check all the trays again add timer timer 1 jal HandleGrowlight #increment timer one and handle grow light j IterateStackDevices DoAtTray: s larre Setting sp #stack pointer after getting tray is equal to junction index for SendLarreToTask: yield #wait for larre to make it to his destination before calling Activate add timer timer 1 #will handle growlight at the end of larre's do cycle l r0 larre Idle beqz r0 SendLarreToTask ActivateLarre: s larre Activate 1 sleep 2 #wait for larre to grab/drop add timer timer 4 HandleGrowlight: brle timer totalTime 2 move timer 0 div r0 timer 120 s db Setting r0 #write the cycle time in minutes to the housing slt r0 timer offTime s growLight On r0 j ra
8 Comments
AlfaOmega 19 Feb @ 8:40am 
Hi, work this or not? Thx
Flow86 13 Sep, 2024 @ 7:12am 
they changed the larre completely, so I think the stations do not start at 0 (the larre dock is 0 afaik?)
Gamerscomplete 31 Jul, 2024 @ 1:26am 
does this not work anymore? I have 10 pots labeled pot0-pot9, the bins and pots are pushed onto the stack in the order they are on the larre rail, but it seems to be missing the first pot and throwing the count off, I was able to get it to work for a couple of movements by putting a dummy push onto the stack at the very start to offset it by 1, but then it just starts doing random things, trying to pick out of the out bin, continually planting and picking up plants, seemingly at random
freiwild 18 Jul, 2024 @ 1:51pm 
Confirm, it's working like a charm now! Thanks for the work you put in :):steamthumbsup:
Wilhelm W. Walrus  [author] 18 Jul, 2024 @ 9:44am 
Yeah that's my bad, I thought Seeding would stay 1 while it was harvestable like Mature. Its fixed.
freiwild 17 Jul, 2024 @ 9:48pm 
Wonderful. I’ve got a similar setup as you and it does everything it should, including growlights! It even collects the seeds. However, i can’t get it to actually harvest. What could i be missing?
Wilhelm W. Walrus  [author] 12 Jul, 2024 @ 6:33pm 
Sure, just replace line 106 (s growlight On r0) with 'sb HASH("StructureGrowLight?") On r0', though I find it unecessary. Above 12 pots, I'd rather build another larre track or it takes too long to do anything, and one growlight can illuminate 12 pots from a the wall positioning depicted above.
Gilbert 12 Jul, 2024 @ 1:31pm 
Sweetness, now, can you make it control a batch of growlights? :-)