Stationeers

Stationeers

63 ratings
Harvie Controller
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
168.569 KB
29 Jan, 2021 @ 11:06pm
18 Dec, 2022 @ 11:37pm
4 Change Notes ( view )

Subscribe to download
Harvie Controller

Description
Works with Farming update Dec 2022
Controls up to 3 Harvies from the one chip.
The Harvies are controlled individually so they can have different crops on different cycles and will still all work.
Monitors water available before planting.
Set the GETSEEDS at the top of the code to set if you want to collect seeds or just the food.
Set the USEPOOP at the top if you want Harvie to wait for fertiliser to be put into the hydroponics before planting.
Can be used with the Greenhouse monitor to check atmospheric conditions https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2378338576

Connection:
d0: hydroponics device 1
d1: hydroponics device 2
d2: hydroponics device 3
d3: Harvie 1
d4: Harvie 2
d5: Harvie 3

Update 19/12/2022 Update for new seeding mechanics from the Farming update.
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