Space Engineers

Space Engineers

126 ratings
Adjustable LCDs
4
2
2
2
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Block, Script
File Size
Posted
Updated
320.231 KB
17 Mar, 2021 @ 6:24am
24 Oct, 2023 @ 12:29pm
14 Change Notes ( view )

Subscribe to download
Adjustable LCDs

Description
Adjustable LCDs

Introduction

This mod adds controls to LCDs allowing you to adjust position and rotation.

Rotors and subgrids are a pain right? I think we can all agree that needing a stack of subgrids, just for your cool bridge or sexy fighter cockpit, is both clangy and annoying (no projector subgrids anyone?). Well fear not brave engineer, for do I have the product for you. This reasonably priced free mod will allow you to relocate your LCDs to your hearts content*. Plus you can animate them, the options are limitless!™

* Hitboxes do not change. I am not responsible for any injury caused due to collisions with invisible blocks

Features

Adjust the location of any vanilla and possibly modded LCD. The full list of adjustable properties is:

  • Yaw
  • Pitch
  • Roll
  • Z offset
  • Y offset
  • X offset

There is also the ability to save various states of transformation, and support for moving from one to another over time (animation). See the video for a guide on that

Location can be either relative to rotation (rotations will be applied relative to the original location), or absolute (rotations will be applied relative to the offset location).

Other features:

  • Persistence including through saves without the mod installed (spawning a ship without the mod installed then saving it will not wipe the configuration of any existing LCDs). This is now a legacy feature and most new features won’t work with it

Disclaimer

This mod changes the LocalMatrix of the block. This will likely confuse any mods or PB scripts which rely on the LCD always being aligned to an axis. I have yet to encounter a mod or PB broken by this but it may happen. You have been warned.

Support for modded blocks

This mod will support any modded block that uses MyObjectBuilder_TextPanel. So probably any one you are likely to use. If you find one that is not supported, leave a comment and I’ll try and add support.

A note on realism

This mod does not change the hitbox of blocks. However, it will allow the visible part of the block to clip through other blocks and of course hang suspended apparently unsupported. You can of course choose not to manipulate the block in such ways as to shatter the illusion but you have been warned.

Conflicts with PB scripts

This mod now stores its data in the mod storage of the lcd block by default, so it should be compatible with any lcd scripts out there. There is still an option to use the custom data storage but doing so may break scripts like automatic lcds 2. If you really really want to use the custom data then check out the "Compatibility with other scripts" section here.

Known conflicts with other mods


License/Reuploading

Parts of this mod are not my own work and I cannot and do not relicense them. These parts are:

  • Log.cs (author Digi)

Please contact the respective authors of the above for redistribution rights. As for my code:

This mod is GPLv3. That means you can reupload it or any mod that contains it as long as you:

  • Keep all existing license notices intact
  • Credit me
  • List your changes (easiest way is with git and github repo)
  • Make all the source code of the relevant mod available freely and publicly with no restrictions placed on its access
  • Make your mod GPLv3 as well
  • Give me your first born child

(ok that last one isn’t actually legally binding)

If in doubt, ask me in comments or the Keen discord (@Natomic). Full license is available here[github.com]. I reserve the right to ask for your mod to be yeeted if you have reused my mod without obeying the license.

Source

The full source code for this mod can be found here: https://github.com/0x00002a/AdjustableLCDs
67 Comments
Into 13 Apr @ 5:54pm 
It seems that Keen has built in a bug with the "new" holo LCD's, which causes the rear side not to flip accordingly, can this script fix it?
qm 10 Apr, 2023 @ 4:59pm 
It's not impossible (that it's a mod conflict), but it's uncommon enough that I haven't nailed down another mod that can be turned off to stop it. Any time it's crashed, it's been the exact same stack trace (looking at some past logs, the NetworkAPI message wasn't present so surely a red herring). Once it was when taking remote control of a distant grid, and as it loaded in the game crashed in the same way.

The most common (but still rare) crash when placing an LCD Panel has been to place one, configure it with a script and adjust the Adjustable LCD parameters, destroy the LCD Panel, then when placing a new one on the same grid, crash. I've only been doing this in multiplayer, and the dedicated server itself doesn't crash, just the client who places the LCD Panel.
Natomic  [author] 10 Apr, 2023 @ 12:30pm 
@qm I can't reproduce that, the stack trace is useful but not quite precise enough to know exactly where it happened unfortunately. It might be a mod conflict?
qm 9 Apr, 2023 @ 4:28pm 
I occasionally get a game crash when placing a screen.
Multiplayer, local dedicated server:

2023-04-09 16:06:40.637 - Thread: 1 -> Info: [NetworkAPI] Entity not registered in dictionary 'PropertiesByEntity'
2023-04-09 16:06:40.702 - Thread: 1 -> Exception occurred: System.NullReferenceException: Object reference not set to an instance of an object.
at Natomic.AngledLCDs.TerminalHelper.<>c__6`1.<AddTermBtn>b__6_0(IMyTerminalBlock b)
at Natomic.AngledLCDs.AngledLCD`1.<>c__DisplayClass71_0.<AddEnabled>b__0(IMyTerminalBlock b)
at Sandbox.Game.Gui.MyTerminalControl`1.OnUpdateVisual()
at Sandbox.MySandboxGame.ProcessInvoke()
...

Not sure if the NetworkAPI message is related or not.
I assume this is saying it's crashing when trying to add a terminal UI element.
Kaito 12 Mar, 2022 @ 9:51am 
If you do not ever plan to publish the result, you don't have to worry about GPL.
Bluestar 12 Mar, 2022 @ 9:38am 
GPL?

Just making a local single player mod
Natomic  [author] 12 Mar, 2022 @ 4:19am 
@Bluestar take a look at the mods source is my best advice. But bear in mind if you just copy the source and modify it you need to make your mod GPL
Bluestar 12 Mar, 2022 @ 2:14am 
Can you give a mini guide to adding the adjustable controls to blocks, i want to add them to some blocks for a privet mod
Kaito 20 Feb, 2022 @ 10:51am 
Fancy
Natomic  [author] 20 Feb, 2022 @ 10:18am 
@Kaito I added animation support recently
@NeonDrip Thanks for the issue report, should be fixed now. I've also implemented (1), that should've been the behaviour anyway :p, for (3) you can use build vision to quickly copy properties but I do think its an important QoL feature, I'll have a think about if/how to add it (2) is easy to do with timer blocks so I don't think its worth adding to the mod.