Space Engineers

Space Engineers

29 ratings
HudLcd v2 1/2 beta w/ Multi-screen blocks
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script
Tags: hud
File Size
Posted
Updated
214.390 KB
23 Feb, 2020 @ 10:40am
18 Oct, 2021 @ 5:28am
6 Change Notes ( view )

Subscribe to download
HudLcd v2 1/2 beta w/ Multi-screen blocks

Description
This is Beta update for this mod
Please report problems with this mod, Thanks

Changes
- Support for multi-screen blocks: Cockpits, Programmable Blocks, Medical Rooms etc.
- Dropped support of Title in favor of Name
- Configuration options changed

How to use
In Custom Data or Name place special text. Example: hudlcd 0.5x-0.7 #Red monospace or hudlcd:range=100:@2:#white
Now you can skip any options without writing colons, but basic options are now written differently. Options can be separated by any character. You can break definition into multiple lines by \ (backslash) at the end of line.

Multi-screen
To select block screen, write number (0 - first screen) after hudlcd keyword. For example:
// default screen: hudlcd 0.5x-0.7 #Red monospace // second screen: hudlcd1 range=100 @2 #white
Numeration is the same as order in terminal.

Position
Format: PosXxPosY
PosX: -1 - left, 0 - center, 1 - right
PoxY: -1 - bottom, 0 - center, 1 - top
Default: hudlcd -0.98x-0.2

Scale
Format: @Scale
Font size.
Default hudlcd @0.8

Color
Format: #Color
Color name (list bellow) or RGB value.
Default: hudlcd #white
Examples: hudlcd #255,0,0 or hudlcd #red - red text

Background
Format: background or background=color or background=color,opacity
background can be abbreviated as bg bg=color,opacity
color - same as above, optional opacity (0-255)
Examples:
hudlcd background - default (black,127)
hudlcd background=red
or hudlcd background=red,127
or hudlcd background=255,0,0,127 - red with 50% opacity

Monospace
You can select monospace font if you need
Example: hudlcd monospace

View Restrictions
You can restrict message to show only in specific view.
Examples:
hudlcd first - show only in first person view
hudlcd third - third person view
hudlcd camera - show only in camera or gun view
hudlcd third camera - effectively don't show in first person

Range
Format: range or range=distance
Show message when player is within distance and on foot. Distance can be between 1 and 5000 (meters).
Shows only if player is owning that LCD.
Examples:
hudlcd range - show message to nearby player, by default 100m from LCD
hudlcd range=1000 - show message when within 1000 meters

NoHide
You can force to show text even in hide hud mode (by default Tab key)
Example: hudlcd nohide

Stable version: https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=1999560983

Color List
aliceblue, antiquewhite, aqua, aquamarine, azure, beige, bisque, black, blanchedalmond, blue, blueviolet, brown, burlywood, badetblue, chartreuse, chocolate, coral, cornflowerblue, cornsilk, crimson, cyan, darkblue, darkcyan, darkgoldenrod, darkgray, darkgreen, darkkhaki, darkmagenta, darkorange, darkorchid, darkred, darksalmon, darkseagreen, darkslateblue, darkslategray, darkturquoise, darkviolet, deeppink, deepskyblue, dimgray, dodgerblue, firebrick, floralwhite, forestgreen, fuchsia, gainsboro, ghostwhite, gold, goldenrod, gray, green, greenyellow, doneydew, hotpink, indianred, indigo, ivory, khaki, lavender, lavenderblush, lawngreen, lemonchiffon, lightblue, lightcoral, lightcyan, lightgoldenrodyellow, lightgray, lightgreen, lightpink, lightsalmon, lightseagreen, lightskyblue, lightslategray, lightsteelblue, lightyellow, lime, limegreen, linen, magenta, maroon, mediumaquamarine, mediumblue, mediumorchid, mediumpurple, mediumseagreen, mediumslateblue, mediumspringgreen, mediumturquoise, mediumvioletred, midnightblue, mintcream, mistyrose, moccasin, navajowhite, navy, oldlace, olive, olivedrab, orange, orangered, orchid, palegoldenrod, palegreen, paleturquoise, palevioletred, papayawhip, peachpuff, peru, pink, plum, powderblue, purple, red, rosybrown, royalblue, saddlebrown, salmon, sandybrown, seagreen, seashell, sienna, silver, skyblue, slateblue, slategray, snow, springgreen, steelblue, tan, teal, thistle, tomato, turquoise, violet, wheat, white, whitesmoke, yellow, yellowgreen
Popular Discussions View All (1)
6
15 May, 2020 @ 1:00pm
Range fuction
MoonMoon
32 Comments
dude 26 Aug @ 6:24am 
no its client side. make this change to line 119 in HudSurface.cs to fix it:
IMyTerminalBlock ControlledEntity => MyAPIGateway.Session?.LocalHumanPlayer?.Controller?.ControlledEntity as IMyTerminalBlock;

it only happens when a player is using the seamless client plugin. it allows players to transfer to other servers without having to completely reload the world (takes just a few seconds). when this happens, the plugin does some magic to properly initialize the client into the new world, and thats when this crash happens. just adding some null checks allows everything to just keep working through that transition.
Kapitan Oczywisty  [author] 25 Aug @ 12:38pm 
Is this error on the server side? LocalHumanPlayer can only be null on the dedicated server, however mod have check for dedicated server at the start.
dude 24 Aug @ 10:00pm 
heres a log of the crash:
Exception: System.NullReferenceException: Object reference not set to an instance of an object.
at KapitanOczywisty.HudLcd.HudSurface.get_ControlledEntity()
at KapitanOczywisty.HudLcd.HudSurface.get_IsSameGrid()
at KapitanOczywisty.HudLcd.HudSurface.Update()
at KapitanOczywisty.HudLcd.HudRenderer.UpdateAfterSimulation()
at Sandbox.Game.World.MySession.UpdateComponents()
at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime)
at Sandbox.MySandboxGame.Update()
at Sandbox.Engine.Platform.Game.UpdateInternal()
at Sandbox.Engine.Platform.Game.RunSingleFrame()
at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass11_0.<Run>b__0()
at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
at Sandbox.Engine.Platform.Game.RunLoop()
at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)
at SpaceEngineers.MyProgram.Main(String[] args)
dude 24 Aug @ 10:00pm 
@Kapitan Oczywisty
Pretty sure adding some null checks at line 119 in HudSurface.cs will fix the issue. Something like:

IMyTerminalBlock ControlledEntity => MyAPIGateway.Session?.LocalHumanPlayer?.Controller?.ControlledEntity;
Kapitan Oczywisty  [author] 23 Aug @ 1:57pm 
I can take a look at crash logs.
Jaymang 16 Aug @ 1:21pm 
Hey, using this with Nexus Seamless mod and mod loader on Sigma Draconis: Remnants server, I'm getting some crashing. I talked with Casimir and Dude, they recommended I send you the logs to see if you'd be interested in fixing the issue. Did you want to take a look at this?
Dziwo 16 Jun @ 12:56pm 
So, I had the same problem as @UncleFester and it seems that I need to change something in the name (just type in a space and delete it for example) for the hudlcd mod to notice a change in the custom data. Works fine if I do that.
Kapitan Oczywisty  [author] 7 Oct, 2024 @ 8:13am 
I have not play SE in ages, though I couldn't find anything suggesting custom data was changed in the game. Functionally custom data are treated the same way as name with only difference that backslash_newline is removed, the same text should work in both places.
- Make sure there is no competing definitions in the name, since name has a higher priority and can override custom data
- Try to restart game, there might be a bug that changes in custom data are not recognized
- Check if there is anything in the SE log with hudlcd in it %appdata%\SpaceEngineers\SpaceEngineers.log
You can also share command which you are using. I don't have time to debug this myself, but I'll keep this on my radar. Please let me know what did you found
UncleFester 30 Sep, 2024 @ 9:55am 
Using this from pluginloader (since the orginal HudLCD started crashing my game last week)

But only way to get it to work is if command is in name field - doesn't appear to look at custom data anymore?
SKY.fungi-guy 15 Sep, 2024 @ 4:13pm 
@Kapitan I apologize for the long delayed response, I lost the game and forgot that I was working on this issue. However, I'm hoping to fit this functionality into my new game so I will double down and try on my current world! Will update with any news or success.