Space Engineers

Space Engineers

Automatic LCDs 2
Can't get Groups to work the way I understand it. Please Help?
I need help with the group filtering. I can't figure it out. I am misunderstanding the instructions, I think. I have a large ship that has a hangar. In this hangar, I have small shuttles that Dock using Connectors for offloading/onloading materials, charging batteries and O2/H2 tanks, etc... Inside these shuttles, I have a Programmable Block and the Cockpit LCDs.

I want the Shuttle to ALWAYS display ONLY the information in regards to that specific shuttle. This way, I know that all Shuttle Systems are ready for takeoff, without seeing all of the Large Ship's information tied in.

So, in the Programmable Block of the Shuttle, I added the LCD code to the EDIT window. Then, in that Programmable Block, I went to Custom Data and entered:

LCD_TAG = "Worker [LCD]"

Then I recompiled.

In the Cockpit of the shuttle, I named the Cockpit:

*Worker Shuttle Cockpit "Worker [LCD]"

And then added the various needed Code to the Custom Data:

Power
Cargo
Inventory

etc....

The Shuttle Screens are still showing information about the Large Ship when docked using the Connector.

What am I doing wrong?

I think the guide needs to be modified to include the specific steps of where to type what, because I followed it as best as I could, but am not getting the results.

Do I need to do something with each specific block I am wanting the script to read? Or just the LCD where I want the information to display? The guide is not clear.

Unless I am trying to use the script for something it cannot do by filtering out sub-grid information?

I think the script may be better to be exclusive to a grid by default, rather than being inclusive of all connected grids, with the option to add connected grids by Grid Name as needed that would auto-add that grid to the info whenever it is connected. I feel like this would probably suit users more than being inclusive of all connected grids by default.
Last edited by KrazyIvanUS; 8 Dec, 2020 @ 3:36pm
< >
Showing 1-8 of 8 comments
Kham 8 Dec, 2020 @ 3:50pm 
So step one, you don't need the " " marks in the block name, those are just used when setting the tag in the programmable block so the script knows it's everything inside the quotations to look for. Wont affect anything but just to clear it up so you're aware those aren't required in the name of your actual cockpit blocks or LCDs.

What you want to do is use 'same grid filtering' for your commands.
Same grid filtering is indicated by using T:
For example

Power T:* <-- Will run the power command against all blocks on the same grid as the PB
Cargo T:* <-- Will run the Cargo command against all blocks on the same grid as the PB

You can also use it with groups, like this

Power {TG:My Random Group Name} <-- Will run the Power command against all blocks which are in the group called "My Random Group Name" which are also on the same grid as the PB.

You can also use it with block name filtering, like this

Amount {T:Turret} <-- Will run the Amount command against all blocks whose name contains the word Turret which are also on the same grid as the PB.
Last edited by Kham; 8 Dec, 2020 @ 3:52pm
KrazyIvanUS 8 Dec, 2020 @ 3:54pm 
Ok. I'll try the filter grid with T:

With groups, do you set a block to a group by adding the Group Name to the Name of the block? What is the format for the code of naming it?
Kham 8 Dec, 2020 @ 3:59pm 
Group names are set in the game's control panel window (K). Select the blocks you want and then up to right there's a section to enter a name for the group and you hit ok or save (can't recall off the top of my head). It's a vanilla feature.
Last edited by Kham; 8 Dec, 2020 @ 3:59pm
KrazyIvanUS 8 Dec, 2020 @ 4:03pm 
Originally posted by Kham:
Group names are set in the game's control panel window (K). Select the blocks you want and then up to right there's a section to enter a name for the group and you hit ok or save (can't recall off the top of my head). It's a vanilla feature.

Originally posted by Kham:
Power T:* <-- Will run the power command against all blocks on the same grid as the PB
Cargo T:* <-- Will run the Cargo command against all blocks on the same grid as the PB

I got you about the group. Thanks.

Back to the initial question:

I have entered this into the Custom Data of the LCD block:

Power T:*
Tanks T:* Hydrogen
Tanks T:* Oxygen

The screen is blinking about every .5 seconds back & forth between these two screens:
(I do have O2/H2 tanks on the Shuttle. And, I do have, on the shuttle, Batteries and a Reactor ON)

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2313547795
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2313547881
Last edited by KrazyIvanUS; 8 Dec, 2020 @ 4:04pm
KrazyIvanUS 8 Dec, 2020 @ 4:18pm 
By the way, the blinking only happens when the shuttle is docked to the Connector. When disconnected, it reads normally.
Kham 8 Dec, 2020 @ 5:59pm 
Oh that's probably happening because you have another PB on the station or ship that it's connecting to which is also looking for [LCD] as the tag.
I tend to find it best to set the entire tag inside the brackets, so like [Worker LCD], [Station1 LCD] etc etc.

What's happening is the one on your other ship/station is also trying to write to the LCD and it's trying to display information relevant to it's own grid so it flashes back and forth as the two PBs fight over control.
Last edited by Kham; 8 Dec, 2020 @ 6:00pm
KrazyIvanUS 8 Dec, 2020 @ 6:15pm 
Sounds good. I will give that solution a shot. Thanks for the help!
Kham 8 Dec, 2020 @ 7:26pm 
You're welcome! :)
< >
Showing 1-8 of 8 comments
Per page: 1530 50