Stationeers

Stationeers

Harvie Controller
21 Comments
Neo 25 Aug, 2023 @ 8:25pm 
One side note about last post:
Add more devices in the code by adding more lines similar to harvie1-10
Neo 25 Aug, 2023 @ 8:08pm 
Code Part 2:

move r8 HASH("Harvie7")
move r9 HASH("Hydroponics7")
jal checkdevice
move r8 HASH("Harvie8")
move r9 HASH("Hydroponics8")
jal checkdevice
move r8 HASH("Harvie9")
move r9 HASH("Hydroponics9")
jal checkdevice
move r8 HASH("Harvie10")
move r9 HASH("Hydroponics10")
jal checkdevice
j start

checkdevice:
lbn r0 harvieHASH harvie Activate 0
bnez r0 ra
lbns r0 hydroponicsHASH hydroponics 0 Mature 0
beq r0 -1 plant
bne r0 1 ra
lbns r0 hydroponicsHASH hydroponics 0 Seeding 0
blt r0 GETSEEDS ra
sbn harvieHASH harvie Harvest 1
j ra

plant:
lbns r0 harvieHASH harvie 0 Quantity 0
beqz r0 ra
l r0 db Setting
beqz r0 ra
lbns r0 hydroponicsHASH hydroponics 1 Quantity 0
blt r0 USEPOOP ra
lbn r0 hydroponicsHASH hydroponics Pressure 0
beqz r0 ra
lbn r0 hydroponicsHASH hydroponics Temperature 0
blt r0 278 ra
bgt r0 323 ra
sbn harvieHASH harvie Plant 1
j ra
Neo 25 Aug, 2023 @ 8:08pm 
I updated the script, it now supports infinite amount of harvies with only one IC!
Note: make sure the names of your devices are matching exactly as mentioned below.
(e.g., "Harvie1", "Hydroponics1")

Due to limitations of max characters, Code Part 1:

define GETSEEDS -1 # -1(No) 0(Yes)
define USEPOOP 0 # 0(No) 1(Yes)

define harvieHASH 958056199
define hydroponicsHASH -1841632400

alias harvie r8
alias hydroponics r9

s db Setting 1

start:
yield

move r8 HASH("Harvie1")
move r9 HASH("Hydroponics1")
jal checkdevice
move r8 HASH("Harvie2")
move r9 HASH("Hydroponics2")
jal checkdevice
move r8 HASH("Harvie3")
move r9 HASH("Hydroponics3")
jal checkdevice
move r8 HASH("Harvie4")
move r9 HASH("Hydroponics4")
jal checkdevice
move r8 HASH("Harvie5")
move r9 HASH("Hydroponics5")
jal checkdevice
move r8 HASH("Harvie6")
move r9 HASH("Hydroponics6")
jal checkdevice
Pear 5 Dec, 2022 @ 2:42am 
Note that checking growth for 4 will not work for corn as it has one extra growth stage. I fixed it based on the value of seeds if it isn't zero do not try harvest fruit (of course maturity must be one).
SerialBullfrog 1 Dec, 2022 @ 7:31pm 
# Harvie controller - Seed Harvesting

alias mature r1
alias growth r2
define PLANTSLOT 0
define INPUTSLOT 0
define HARVESTSEEDS 1

s db Setting 1

checkHydroponics:
bdns hydroponics ra
bdns harvie ra
ls mature hydroponics PLANTSLOT Mature
beqz mature ra
beq mature -1 plant
ls growth hydroponics PLANTSLOT Growth
beq growth 4 ra
s harvie Harvest 1
j ra

The changes that fixed the script to harvest seeds were adding these 2 lines right before the Harvest command. I also added the growth alias at the top.

alias growth r2

ls growth hydroponics PLANTSLOT Growth
beq growth 4 ra

This loads the Growth variable from the hydroponics device and if growth is 4, the plant is still seeding, so Harvest doesn't happen. When growth changes to 5, seeds are harvested.
el.emperador 8 Nov, 2022 @ 1:15am 
November 2022: Since the seed now appears later than the fruit, no more seeds are harvested. How to customize that the harvesting process is blocked until the seed has matured?
Keramane 7 Nov, 2022 @ 6:05pm 
Couldn't you use flip-flop splitters and have them output into the front of your Harvies so they would load-balance and distribute the seeds you want? The load-balance would require a stacker set to 1 (so as to ensure an even load balance) that then feeds into the seed-loading chute line, but it would be relatively easy I'd figure.
Iommonaut 9 Mar, 2022 @ 9:52am 
It is working for me now just doesn't have any way to automate refilling the harvies with seeds which still has to be done manually
Rockatansky 15 Jan, 2022 @ 4:58pm 
Not working
ждун 26 Oct, 2021 @ 4:56pm 
@CowsAreEvil consider this:

harvest:
ls r0 hydroponics PLANTSLOT Seeding
ls r1 hydroponics PLANTSLOT Mature
xor r0 r0 r1
beqz r0 ra
s harvie Harvest 1
sleep 5
j ra
Popeye 24 Sep, 2021 @ 3:31pm 
you never reply to anything on your workshop it seems
Mr-Chris 19 Sep, 2021 @ 8:36am 
I am having an issue with the controller now. If I use fertilizer the harvie only harvests part of the seeds and part of the fruit.
Otherwise this has been working great. I have a setup of 8 harvies and a chute system that divides the seeds and fruit up. once you start the system it never stops until you break the chutes to stop the recycling of seeds! The fruit goes straight to the oven and the oven goes to the automated packaging machine! I have a limitless supply of canned french fries and tomato soup
Mr-Chris 22 Aug, 2021 @ 8:24pm 
Love it. You def need a sorter to handle all the seeds and food.
This worked great. Thanks
Sou7ution 10 Aug, 2021 @ 1:00pm 
The first Harvie keeps all Seeds. I have 9 Harvies connected with a chute. Why do the first push the seeds not to the next one?
Bluelight 16 Jul, 2021 @ 9:27am 
Can you make a script to follow up on a full sorter and stacker setup for managing the seeds and produce, and also update the Harvie script to use a gas sensor to prevent planting if the temperature and stuff isn't quite right?
johannesmeyer2 4 May, 2021 @ 5:14pm 
Wenn Harvie nicht pflanzt kann es an der Temperatur vom Wasser liegen. Hab einfach die Temperatur im Programm um 10 Kelvin reduziert. Seit dem läuft das Programm perfekt.

Danke für das Programm.


If Harvie doesn't plant, it may be due to the temperature of the water. I simply reduced the temperature in the programme by 10 Kelvin. Since then, the programme has been running perfectly.

Thanks for the programme.
PressureSwitchX 17 Apr, 2021 @ 5:17pm 
Thanks! love your channel.
Julia 13 Apr, 2021 @ 8:13am 
Does not to start automaticly
mickur 10 Apr, 2021 @ 12:01pm 
Der Harvie erntet alles aber pflanzt nicht wieder. Gibt es dafür schon eine Lösung?
-----
The Harvie reaps everything but does not replant. Is there already a solution for this?
bluesky-wr 27 Mar, 2021 @ 3:40am 
is it not possible to work with Pefab hash codes to control all Harvys and Hydrophonics?
xcrafter09 3 Mar, 2021 @ 6:25am 
noice