Space Engineers

Space Engineers

[TMC] Tree Menu Command NET
cheerkin  [developer] 5 Apr, 2022 @ 2:59am
Bug reports
If you get errors, crashes or broken behavior, tell me.
To be helpful, please consider following this template:
=====================================
What happened and what I expected

Steps to reproduce
  1. Steps go here
  2. Step1
  3. Stepz

Additional data

Originally posted by CustomData menu definition:

Data goes here

Originally posted by PB screen log output:

Additional notes, observations

=====================================

Example:

What happened and what I expected
Sometimes I get two "<" prefix on menu entries while operating remotely. Normally there should be only one.

Steps to reproduce
  1. Simple setup with a PB, cockpit, using internal screen. Two small grid ships with same configuration.
  2. Run the script, local context, > mark is on the first menu entry called "core"
  3. Change context to other ship, move mouse, > mark stays on the first entry "core" and also follows the mouse, thus giving two marks on the same screen, like this:
    >core
    min3r
    >block queries
    etc

Additional data

Originally posted by CustomData menu definition:

core pillock-mode:Disabled pillock-mode:WP min3r command:force-finish block queries etc

Originally posted by PB screen log output:

Additional notes, observations

This happens only in remote mode, and if menu definitions are the same on both grids.
Last edited by cheerkin; 5 Apr, 2022 @ 3:26am
< >
Showing 1-15 of 39 comments
CHKNFRYRMN 6 Apr, 2022 @ 6:32pm 
When playing on a server, the refresh rate of the panel seems to decrease by a lot but when I go into a single player world it is fine.
cheerkin  [developer] 7 Apr, 2022 @ 12:19am 
Decreased refresh rate on server is enforced by game developers, It is known to be the game feature/issue.
Kikimora 27 May, 2022 @ 5:55pm 
I guess my problem does not include any bug, but asking in this discussion is maybe better.
So this is my problem:

I have the following customdata in the PB with TMC:
General block control
loading
Cruise control
Normal
Cruise
Camera switch
report:Camera-front
DisplayName=Camera-front;first:Camera-front:View

I am inside a grid with multiple cameras and I wanted to use TMC for viewing different cameras. So I tried first with a single camera called "[SomeGridPrefix] Camera-front", but the two lines at the end of the customdata are not working.
I thought first that view action for camera is not called as "View" actually. Then I tried to find out the correct name with report, but I could not find the log output on the PB screen.
The PB with TMC is a small grid version. It is currently showing "text and images" with the text "Tree Menu Command".
cheerkin  [developer] 28 May, 2022 @ 5:15am 
Hmm, I'm afraid you can't View camera like this, it does not make sense. Calling an action View from within a script means like you want your PB to look through camera, but PBs can't do that.

Originally posted by Rorqual:
I Then I tried to find out the correct name with report, but I could not find the log output on the PB screen.

Check out both main screen and keyboard screen - I think I moved the log to the second one in latest version.
Kikimora 28 May, 2022 @ 6:02am 
Thx:steamthumbsup:
I found the log on the keyboard.
Originally posted by cheerkin:
Hmm, I'm afraid you can't View camera like this, it does not make sense. Calling an action View from within a script means like you want your PB to look through camera, but PBs can't do that.
It makes sense. Of course, PBs cannot view any cameras XD
Then I will just use toolbar for switching camera.
Last edited by Kikimora; 28 May, 2022 @ 6:03am
Rusted Droid 18 Sep, 2022 @ 1:14pm 
I try the seat, remote and in front of remote, facing player i add small programing block.
I set it up but menu is displayed 180° and on keyboard script ask for LCD to write debug info.

Can i rotate menu?
cheerkin  [developer] 18 Sep, 2022 @ 1:48pm 
This is a bug in SE sprite API, we don't have access to text rotation in scripts. Just use separate LCD screen instead, using PB screen is not recommended until they fix this.
Rusted Droid 19 Sep, 2022 @ 1:46pm 
Well this is odd... text on keyboard area is correct aligin only menu is upsidedown.
Hmm.. Then i must use different type of ProgBlock from mods and use lcd as extra block.
Still... your script ask for extra LCD and halts if i use: Battery, Programing block, Remote block and Seat.
Rusted Droid 19 Sep, 2022 @ 1:58pm 
I did try your script with Micro Programmable Block mod ==
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=401530181

Got object reference is not instance of an object...
Maybe that the block has only one LCD?
cheerkin  [developer] 19 Sep, 2022 @ 6:31pm 
>Maybe that the block has only one LCD?
That's likely the case. The script wants normal PB with keyboard because it writes log to it.

>Still... your script ask for extra LCD and halts if i use: Battery, Programing block, Remote block and Seat.
Can you be more specific? See the discussion OP, and make sure you followed the set up steps.
Rusted Droid 20 Sep, 2022 @ 12:43am 
1. I build simple setup that consist of (Battery, RemoteBlock, Programing block and Seat).
2. I setup your script with block group "PC" contain PB+RemoteBlock.
3. I hit recompile, the keyboard on PB change to debug saying =
"Add LCD or Cockpit to group so script can write to"
On PB main LCD render menu upsidedown while mouse is upwards.
cheerkin  [developer] 20 Sep, 2022 @ 1:19am 
Ah, you mean the "Need something to write to. Add at least one LCD or cockpit to the main group." message. It's all good, the script does not halt, it works without it (in remote mode).

Sorry for somewhat misleading message, I'll change it.

If you want to have controllable menu on this particular PB, you need to use either cockpit screen or dedicated LCD panel. I made it this way because using internal PB screen is bugged, as you already discovered. I'd love to make it work, but it is impossible to fix inside a script - we can't rotate text sprites, so I only hope keen would sort it out (hint: they won't).
Rusted Droid 20 Sep, 2022 @ 5:24am 
Yeah i know keen. Until someone bully them they give that person BAN and then fix that damn bug.
LCD screens in Cockpits was not planned for SE but they were pushed to do that by somenone...
Can you make script work when PB has no screen?
This mod also throw "not instance of an object" error.
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=1165062748
cheerkin  [developer] 20 Sep, 2022 @ 5:44am 
I can, but you'd need to "LCD Debug" screen on your grid to have the log pushed there instead of trying to write to PB keyboard. Don't expect the update soon, although I can tell you how to modify it if you really need to use that modded pb.

1. Find the line "surfaceForMenu = Me.GetSurface(0);" and comment it out like that:
"//surfaceForMenu = Me.GetSurface(0);"

2. Make sure you have "LCD Debug" screen on your grid for logging.

If you really determined to use screen-less PB for some reason with this script and don't want to add LCD panel, you can also comment out these lines:

l = (g.GetBlockWithName("LCD Debug") as IMyTextPanel) ?? me.GetSurface(1);
and
l.WriteText($"{T}: {s}\n", true);

This would bypass logging, but also make some important features unavailable.
Svetressito 15 Nov, 2022 @ 8:42am 
I cant seem to get the script to work with small grid "Industrial Cocpit".

1. My TMC setup is in essence a simple TMC PB and an industrial cocpit.
2. The script starts as normal and whrites to the pre-determined screen.
3. i changed the "MenuScreenIndex" to 3.
4. now it wont work and no matter what number i set MenuScreenIndex to the PB only outputs

0: Need something to write to. Add at least one LCD or cockpit to the main group.

i have tried to recompile multiple times, "re-whrite" the script to PB and even delete the PB entirely and replacing it but still nothing.

It is a creative singelplayer world with scripts on and i do have this script running on another build in the same world without issues.
< >
Showing 1-15 of 39 comments
Per page: 1530 50