Stationeers

Stationeers

View Stats:
Drosta Aug 25, 2024 @ 7:31pm
Slot reading
Hey all,

I'm trying to write a simple script to have a flasher come on when my Filtration unit's filters are low and I thought i had gotten things written out correctly but it's throwing an error.

what I have is

ls r3 airfilter 0 Quantity

I suspect what it doesn't like is the Quantity variable but i'm not sure which one would be correct. Charge seems to make the most sense based on what I want from it but it says in the tooltip that it's for the "current energy charge" of the slot occupant. So I'm not sure what to use.

Thanks

edit - I tried both Charge and ChargeRatio. same error on the same line.
Last edited by Drosta; Aug 25, 2024 @ 7:33pm
< >
Showing 1-14 of 14 comments
h_LordEC[no-VC] Aug 25, 2024 @ 8:14pm 
"Quantity" is the correct logicSlotType.

I use a modified version of Cow's Internal Filtration Controller. That code is using a diode to show the % remaining of the filters. Then, I use a Logic Reader and Writer, to see if the diode is on, to then turn on a Flashing Light, to indicate when a filter is empty.

Did you alias the devices correctly and set the correct pins?
Last edited by h_LordEC[no-VC]; Aug 25, 2024 @ 8:16pm
Drosta Aug 25, 2024 @ 8:22pm 
Originally posted by h_LordECno-VC:
"Quantity" is the correct logicSlotType.

I use a modified version of Cow's Internal Filtration Controller. That code is using a diode to show the % remaining of the filters. Then, I use a Logic Reader and Writer, to see if the diode is on, to then turn on a Flashing Light, to indicate when a filter is empty.

Did you alias the devices correctly and set the correct pins?

Yes and no. I defined the Filter using its reference ID. I know that alias is fine because it works for other parts of the script. Turning it off and on and changing its mode for example. It always gets stuck at that line for whatever reason. I was wondering if it's a weird limitation of setting the device that way, not using a pin. But I don't see why that would be the case unless it was an oversight by the devs.
Last edited by Drosta; Aug 25, 2024 @ 8:23pm
JeanDeaux Aug 25, 2024 @ 11:05pm 
ls r3 airfilter 0 Quantity

This is a valid code and is the method I use in my working code. If this line is giving you an error then your alias calls ahead of this have some sort of error or have not been properly defined.
Drosta Aug 25, 2024 @ 11:44pm 
Originally posted by JeanDeaux:
ls r3 airfilter 0 Quantity

This is a valid code and is the method I use in my working code. If this line is giving you an error then your alias calls ahead of this have some sort of error or have not been properly defined.

ill take a look tomorrow. I added this line after everything else had been working without an issue so I'm not sure how or why it would have caused a conflict. but ill take a closer look. thank you.
Btw., would be helpful to know what particular error is being shown.
Drosta Aug 26, 2024 @ 9:40am 
Originally posted by God, owner of the Universe:
Btw., would be helpful to know what particular error is being shown.

If there are more detailed error messages I'm not aware of where to see them. I just look at the IC10 and see error on line 31. Line 31 is just what I put above.

ls r3 airfilter 0 Quantity
JeanDeaux Aug 26, 2024 @ 9:50am 
Share the whole code if you're willing, the one line alone isn't going to let us help out here.
Drosta Aug 26, 2024 @ 10:01am 
Yeah no problem. I was in the process. if you need all of it let me know, but I figured just the start and up to the error would be enough. forewarning, it isn't "airfilter" I did Hairfilter (Hab Air Filter) and Hairanal for a pipe analyzer because im a child.

https://steamcommunity.com/profiles/76561198034102068/screenshot/2428089923946259053/

https://steamcommunity.com/profiles/76561198034102068/screenshot/2428089923946259749/

oh, and for testing. I did try setting the initial state of the filter's On variable to 1. In case it was being caused by it being off. my default for the start of that code is to have everything turned off so it doesnt stay on when not in use. anyway, it didnt help changing it to on.
Last edited by Drosta; Aug 26, 2024 @ 10:05am
Drosta Aug 26, 2024 @ 10:19am 
Okay so, I have tried assigning the filter to a pin and I no longer get the error code. As suspected last night, it's that the command for loading slot values doesn't like the way the IC10 was updated to not require pins but instead could use referenceID. So I guess for this application I'll have to give it a pin. Hopefully this oversight will get patched and we can use referenceID for everything.
Last edited by Drosta; Aug 26, 2024 @ 10:30am
Secure by Design Aug 26, 2024 @ 10:59am 
you can also use lbns[stationeers-wiki.com]
Drosta Aug 26, 2024 @ 11:42am 
Originally posted by Secure by Design:
you can also use lbns[stationeers-wiki.com]

yeah but that would return the value from all filter slots on the network right? it's only crucial I get a warning from these ones.
Secure by Design Aug 26, 2024 @ 11:58am 
not if that one hat a different name which match in lbns command only
define allFiltrationUnits HASH("FiltrationStructureName") define filtrationToWatch HASH("nameOfThatOneFiltrationToWatch") lbns r0 allFiltrationUnits filtrationToWatch 0 Quantity
Drosta Aug 26, 2024 @ 11:59am 
Originally posted by Secure by Design:
not if that one hat a different name which match in lbns command only
define allFiltrationUnits HASH("FiltrationStructureName") define filtrationToWatch HASH("nameOfThatOneFiltrationToWatch") lbns r0 allFiltrationUnits filtrationToWatch 0 Quantity

oh cool i didnt know that. thanks!
Secure by Design Aug 26, 2024 @ 12:01pm 
correct device hashName is StructureFiltration
nameHash change w/ labeler
define filtrationUnits HASH("StructureFiltration") define filtrationX HASH("FILTRATION.X") # filtration label main: yield lbns r0 filtrationUnits filtrationX 1 Quantity Sum # left filter s db Setting r0 # show at housing j main
Last edited by Secure by Design; Aug 26, 2024 @ 12:17pm
< >
Showing 1-14 of 14 comments
Per page: 1530 50

Date Posted: Aug 25, 2024 @ 7:31pm
Posts: 14