Space Engineers

Space Engineers

SDS Operational Script
208 Comments
MSG Gunny May 28 @ 1:06pm 
Is there argument I can send to program block with SDS script that will change it to a certain menu page?

---So far im just using the arguments prev or next, but if not on main menu 0 it just goes and displays the menu I do not want.

EXAMPLE: I have a timer block that turns on my weapons and plays sounds etc... it would be nice to have a argument that will send to SDS script to go to, lets stay meun 3 where it displays weapons status, ammo etc... This could also be used for other senerios like this.

If not hope you will consiter it for a update feature or for another script build down the road.
Unknown Apr 27 @ 7:41am 
I'm not very good at English, so sorry for the mistakes!
You made a great script!
I don't know how to program in Space Engineers and your script helped me take my buildings to a new level of automation and improved control!
I'm very pleased with the flexibility and ease of setup your script.
The only negative that I came across is that the script does not support all the blocks in the vanilla game, such as wheel suspensions
I don’t understand programming and I don’t know exactly why you missed some of the blocks, but if this is due to the fact that the script would become too large and complex, then I can suggest one way out in this situation: your script can send commands to others program blocks!
You can make the second part of the script with support for those blocks in the form of a separate program that were not included in the first script, after which it will not be difficult to link them together using your system for exchanging commands between program blocks.
GROTESK Jan 7 @ 7:19am 
Как возвращаюсь в игру, так всегда пользуюсь вашим скриптом! Не представляю уже игру без него. Очень помогает, когда сам не умеешь программировать.
Еще раз благодарю уже в 2024 году!
McNormandy Nov 19, 2023 @ 4:49am 
is there an option to display the shield strength of the defence shield mod?
DEeM0N  [author] Jun 7, 2023 @ 10:59am 
When playing on servers, there is a bug of Space Engineers with the display on the screen, when someone's image may simply not be drawn
coolfarmer Jun 6, 2023 @ 8:53pm 
Sorry for the spam. I just conducted another test with my friend on grid 2 (the grid where the cargo percentage on the LCD does not update when I add something to the cargo). I discovered that if my friend adds something to the cargo, the percentage is correctly updated for me but not for him.

On the other hand, when I put something in the container, the percentage is correctly updated for him but not for me.

There is clearly a sync/network code problem here.
coolfarmer Jun 6, 2023 @ 8:39pm 
Okay, after doing some tests, I've noticed some unusual behaviors. I'm playing on a dedicated server, and I conducted three tests on three different grids.

In the first grid, my friend sees a blue screen on the LCD, even after recompiling. It's quite strange.

In the second grid, my friend sees the data correctly updated, but the two lines (Thrusters & Cargo) are overlapping, which is not cool.

In the third grid, everything is working fine for both of us.

From my perspective, the first grid is functioning perfectly, with no blue screen on the LCDs. However, the second grid is broken for me (as mentioned in my previous message). And the third grid is working well.

Is this behavior normal? Even after disconnecting and reconnecting, the problem did not fix itself. I also tried spawning your demo ship, and one out of three times, the ship spawned with a blue screen on the LCDs.

Could it be that the script is broken?
coolfarmer Jun 6, 2023 @ 8:02pm 
I'm trying to understand why the cargo percentage is not showing correctly. Let's consider the this configuration:

[0]
All Thrusters;thrust;all/all;onoff
Large cargo;show;Cargo Container;inv

This configuration displays the current inventory of the Cargo Container. However, it doesn't update if the container is filled further, even after pressing the "Recompile" button. To update the value, I discovered that the only way is to modify something in the Custom Data. So, if I remove the "All Thrusters" line:

[0]
Large cargo;show;Cargo Container;inv

And then press the recompile button, the value is updated correctly. However, it stops updating afterwards. I have to modify the Custom Data again by adding or removing another line to get it working again. Why is this happening?
Asarjan [GER] May 23, 2023 @ 4:36am 
is it somehow possible to add a blank line?
e.g.
Batteries |||||| [100%]
H2-Tank ||| [50%]

Cargo [0%]
YungPro Mar 17, 2023 @ 5:20am 
confusing lvl 9000
DEeM0N  [author] Mar 2, 2023 @ 11:42am 
No, unfortunately this cannot be done
Meracan_ Mar 2, 2023 @ 1:10am 
@DEeM0NX Thanks for the guidelines. I figured a way to check railgun recharge time with Timer Blocks. Is it possible to check the time remaining from the counting timers?

ex: (Timer Block 1 [|||||||||||| ] 35s <in seconds>)
*Progress Bars can be optional
DEeM0N  [author] Feb 25, 2023 @ 9:57am 
@Meracan_
1. The weapon charge is not shown
2. You can see the jump charge, something like this: Jump 1;show;Jump Drive 1;jump
Meracan_ Feb 24, 2023 @ 9:32pm 
Very Nice GUI Layout!
btw I have some issues when after my first setting it up:
1. Is it possible to check how the weapons are charged?(energy charged & charge percentage)
2. How to check power state of the jump drives?
Like I want to show each jump drive's remaining charged time and how much is already
charged. (ex: Jump Drive 7 [|||||||||||||| ] 70%<or 210 MJ>)
EasySIX Jul 23, 2022 @ 8:02am 
Thank you Quell - That's the same error, after remove the spacebar it works^^
Quell Jul 8, 2022 @ 11:44am 
nevermind, ignore my previous comment. The custom data section inside the code has a spacebar at the LCDPrefix which shouldnt be there and as a result you get an error. Remove the spacebar and the script works
Quell Jul 8, 2022 @ 7:00am 
After a couple hours of tinkering I managed to get it to work by putting a text on the programmable block (LCD Panel Large Display on program block). Really weird bug on either your side (script) or mine
Quell Jul 8, 2022 @ 4:24am 
I have also the same error as the guy couple comments under me:
Error!!! in Custom Data [Main] section

Ive pasted the exact example code into custom data, Main, Add and Color. My Cockpit has the exact same prefix as name and the LCD panels as well
Gromit Jun 5, 2022 @ 11:39pm 
@Colby: a script is not a mod. It must not be loaded in the mods list but in a programmable block
Colby Jun 5, 2022 @ 3:14pm 
2022-06-05 18:04:27.546 - Thread: 16 -> MOD_CRITICAL_ERROR: SDS Operational Script
2022-06-05 18:04:27.546 - Thread: 16 -> in file: Unknown
2022-06-05 18:04:27.546 - Thread: 16 -> MOD PARTIALLY SKIPPED, LOADED ONLY 1/6 PHASES, Following Error occured:
Object reference not set to an instance of an object.
Sandbox.Game
at Sandbox.Definitions.MyDefinitionManager.LoadDefinitions(List`1 contexts, List`1 definitionSets, Boolean failOnDebug, Boolean isPreload)
Colby Jun 5, 2022 @ 3:07pm 
I have this mod on my dedicated server and this is the error i see on my client after joining

Some mods were not loaded because of errors. See log for errors
ninjawizard May 31, 2022 @ 12:52am 
this looks fantastic, i will test it tomorrow!
Vortek Gamer May 22, 2022 @ 3:14pm 
thanks for quick responds. Can i suggest of that function?
DEeM0N  [author] May 18, 2022 @ 10:39am 
@VirtualGaming, there is no such functionality
Vortek Gamer May 17, 2022 @ 6:57pm 
DEeM0NX is there a way I can show the Rotor/piston info like Rotor angle and piston distance?
miner_sd May 15, 2022 @ 9:50pm 
i removed the autoairlocks part and it still says this:
Error!!! in Custom Data [Main] section
Total 2 items found in TopMenu
...and 2 menus was found
DEeM0N  [author] May 14, 2022 @ 3:23am 
@miner_sd, script can't find the "AutoAirlocks" group, that is written in the Custom Data
miner_sd May 14, 2022 @ 2:14am 
I cant get this to work, I pasted the custom data and changed the LCD and cockpit prefixes as shown, and added the prefix to the cockpit, but the script says:
``` Running setup ...
Error!!! in Custom Data [Main] section
Total 2 items found in TopMenu
...and 2 menus was found
Error: Group AutoAirlocks not found
Error in [AutoAirlocks] line: 1```

then continues saying it found x, y, and z different blocks which all looks more or less correct (including saying it found 1 cockpit)

anyways, how would I go about fixing this?
jglenn1562 May 7, 2022 @ 12:49am 
That sounds awesome, also nice plane!
Sander May 4, 2022 @ 3:19pm 
@jglenn1562, thanks for the feedback my man. Yea I've started to put in functional checkpoints, but only working on a script that can add text to lcds, so you have one functional checklist, and then its is one checklist on another screen which contains the input changes you need to put in the flight aligner to correct pitch, like inflight pitch. Then when you hit a command on the toolbar it changes "Decent Pitch set to -5 [_____]" to "Decent Pitch set to -5 [CHECK]".

Its for my new project: https://imgur.com/a/ZkWzXYy
jglenn1562 May 4, 2022 @ 8:37am 
@Sander,
Since it seems that you cannot use subprograms to update/edit existing lines on an LCD, you might have to have subprograms do this for each item you check on the checklist:
Clear the Checklist LCD > rewrite the entire checklist on the Checklist LCD reflecting that newly checked item, while retaining the prior checked items.
(this would mean you can't perform your pre-flight checklist out of order, but this is realistic anyways since if you skip steps, people will die).
jglenn1562 May 4, 2022 @ 8:28am 
@Sander,
That's such a simple, yet ingenious idea. I'm not sure about adding non-functioning text to the interface itself, however you can use subprogram routines to interact with a checklist LCD.
Example:
[0 start sub-program]
Disable landing brakes;gr-lgear_lock;parking brakes;unlock
Update checklist;write;Checklist LCD;nltext=DISABLE PARKING BRAKE [X]
Sander May 3, 2022 @ 8:32pm 
Hi, wanna start with saying what an Awsome script :D
Is it possible to just display boxes with no function on a page?
I wanna make a Flight Checklist, for example:

[0]
Oxygen 100%;OnOff (So here you can tick the box).
Parkingbreak;OnOff

Thx for the help in advance :)
A shitton of shitties Apr 17, 2022 @ 10:54am 
Thanks! That clears things up. I was just confused and thought it was controlled through the mouse. I don't necessarily need it to be, though.
DEeM0N  [author] Apr 17, 2022 @ 1:59am 
@A shitton of shitties, The data that the LCD script will use is recorded in the custom data of the program block.
Some kind of cockpit or remote control is required for the script to work. But you can not use it for WASD control, but send commands to the program block from any button panels... such as "up", "down" - to move the cursor, or any commands for direct control of blocks too
jglenn1562 Apr 16, 2022 @ 8:27pm 
Now, there is one other interface menu script that I know of, that allows for actual mouse movement interface, search "Tree Menu Command NET" without the quotes, and you should find a new script that is significantly more complicated than SDS, but it allows a different interface method. Do note, that unfortunately the script still requires a control seat (as of right now).
jglenn1562 Apr 16, 2022 @ 8:26pm 
You can use button panels, and assign buttons to send commands to the SDS program block. If you're saying that you want to interface with the LCD, like a touchscreen, this script unfortunately doesn't support that. If you're wanting an LCD that displays system statuses, then you should just head to the workshop, filter in-game scripts, and then sort by top uploads. There's plenty of options out there to display statuses.
A shitton of shitties Apr 16, 2022 @ 5:19pm 
What I mean is, the large LCD screens that are only screens. No seat.
A shitton of shitties Apr 16, 2022 @ 5:19pm 
Is there any way of doing it that doesn't involve a control seat? I would prefer to not have the control seat involved, as it seems it might mess with other controls. I just want control panels on LCD screens.
jglenn1562 Apr 16, 2022 @ 2:24am 
You need to add a hotkey to the control seat you're using that runs the command "wasd" without the quotes to the SDS PB. That will enable LCD interface.
A shitton of shitties Apr 15, 2022 @ 11:07pm 
I'm missing the information on how to use LCD screens with this. The guide makes it seem as though everything goes in the PB's custom data? How do I get the things on the LCDs?
jglenn1562 Mar 24, 2022 @ 1:07pm 
@DEeM0NX
Awesome, thank you very much! What's the link/where can I find it?
DEeM0N  [author] Mar 24, 2022 @ 11:16am 
@jglenn1562, Yes, I can give an unminified version. Here it is minified, because otherwise it does not fit into the character limit of the program block.
jglenn1562 Mar 23, 2022 @ 4:05pm 
Would there be any chance you'd be willing to provide the un-minified version of the in-game script? I want to see what it would take to adapt the script to utilize simspeed agnostic game time. I was told, this would avoid any sort of timing issues induced by sim speed, which is what I'm likely experiencing during online tests.
DEeM0N  [author] Mar 21, 2022 @ 10:30pm 
@jglenn1562, I did not plan to make global improvements to this skript
jglenn1562 Mar 20, 2022 @ 2:05pm 
I might botch this, but essentially if there was a way I could add a subroutine line such as "If Piston 'X' extended to 8, proceed to section 2;piston_pos;Piston 'X';8;run;2;0". Another example could be "If Hangar Door closed, go to section 6 to vent compress;gr-door_state;Hangar Door;closed;run;6;0". I hope this makes sense, this could turn this already powerful script into something much much more, as well as combat internet connection/synch speed issues with timing.
jglenn1562 Mar 20, 2022 @ 1:51pm 
Hello!
What are the chances of implementing event-driven commands, or if/then functionality to subprograms and the auto airlock feature? I have a large ship with heavy SDS-OS usage, and have perfect timing with all my subprograms and auto airlocks in singleplayer. However, as soon as I jump online and run tests, the auto airlocks no longer allow the doors to completely close before powering them off, and my subprograms no longer have the correct timing, and this could lead to disastrous results with what's being handled. I believe this system could HEAVILY benefit if event-driven routines could be handled.
jglenn1562 Mar 9, 2022 @ 2:57pm 
Thank you two for clearing things up!
DEeM0N  [author] Mar 9, 2022 @ 12:03pm 
@jglenn1562, The second parameter (which you have for 3 seconds), is used only if there is NO air vent in the group. Then the doors will wait 3 seconds before opening to pump air out of the airlock. If ventilation is present, then the airlock will not wait and will open immediately after pumping out the air
IamPhilipp  [author] Mar 9, 2022 @ 12:01pm 
@jglenn1562
so if you want to see airlock effect, you need to configure external door Custom Data to some depressurising time (2+ sec for example)