Space Engineers

Space Engineers

2,896 ratings
Text HUD API
9
7
2
   
Award
Favorite
Favorited
Unfavorite
Type: Mod
Mod category: Script, Other
File Size
Posted
Updated
1.067 MB
Sep 5, 2016 @ 8:02am
Feb 23, 2022 @ 3:13pm
98 Change Notes ( view )

Subscribe to download
Text HUD API

In 2 collections by DraygoKorvan
Space Engineers Physics
11 items
Deathmatch Toolkit
6 items
Description
Allows modders to add text to the players screen. This mod must be loaded along side any other mod that uses it.

Graphics update note: Post-Processing causes all HUD API text to be dark and blurry unless it uses the PostPP blendtype.

Common Issue: If the mod is not working delete Steam\steamapps\workshop\content\244850\758597413 to force TextHUDAPI to redownload the latest version from steam.

Features:
Add Text HUD elements
Add Text to world
Add Text attached to Entities.
Add Billboards to HUD elements
Adds an interactable mod menu.
Fonts are fully modifable.


There is now a new API class that interfaces with this mod you can get it here:

[SteamLibrary folder]\steamapps\workshop\content\244850\758597413\Data\Scripts\HUDApi\HudAPIv2.cs

In a Session Component init the mod using the Init Method

TextAPI = new HudAPIv2(onRegisteredCallback);

Note: onRegisteredCallback method will be called when the API registers to this mod you can then declare all HUD/Menu elements in that method.

Note before using any class make sure Heartbeat is true. If you try to call a constructor while Heartbeat is false it will lead to a crash. Using the Callback method can help you avoid this issue.

Editing any class property will update it instantly, there is no longer any network messaging involved with the mod. This also means you have to now worry about thread safety.

Modders:


You can change the color of the text with the <color=colorname> tag. No closing tag is required. You can use multiple colors in the same message.
<color=r,g,b> and <color=r,g,b,a> also supported. r = red [0-255] b = blue [0-255] g = green [0-255] a = alpha [0-255]
<i> tag for italic text. end the tag with </i> ex. <i>this is italic text</i>
<reset> will reset the formatting of the text back to the default. <color=red>a<i>b<reset>c

The Heartbeat property lets you know if the class has received a heartbeat, so you can be confident the player has the mod installed. If they do not then you can revert to any previous messaging scheme you had.

V3.1
Added custom font support. ( Example mod: https://steamcommunity.com/sharedfiles/filedetails/?id=2163222751 )

V3.0
Added BoxUI
Fixed menu display order.
Added InitialColor property for HUDMessages.

V2.6
Removed support for version 1.

V2.53
MenuColorPicker added

V2.52
Draw() Method added
Performance improvements

V2.51
Included some performance improvements.
Modders now can manually flush the cache by calling the Flush() method.

V2.5
Texture files eliminated, mod now uses a UV map to generate the font.
Monospace font added
Mod menu added



Thanks to Digi for pointing me in the right direction to get it working properly with 3rd person.

Localization complete, now supports all characters - Thanks Midspace!

Mod List:
Notes (v2) - http://steamcommunity.com/sharedfiles/filedetails/?id=758966734
Easy Inventory (v2) - http://steamcommunity.com/sharedfiles/filedetails/?id=646796262
Aerodynamic Physics (v2) - http://steamcommunity.com/sharedfiles/filedetails/?id=571920453
Build Vision - http://steamcommunity.com/sharedfiles/filedetails/?id=756792814
Text Projector (v2) - http://steamcommunity.com/sharedfiles/filedetails/?id=762397930
Build Hints - http://steamcommunity.com/sharedfiles/filedetails/?id=762950855
Dock Assist (v2) - http://steamcommunity.com/sharedfiles/filedetails/?id=764754640
Stargate mod - http://steamcommunity.com/sharedfiles/filedetails/?id=754173702
Wormhole portal - http://steamcommunity.com/sharedfiles/filedetails/?id=377773977
Score Screen (v2) - http://steamcommunity.com/sharedfiles/filedetails/?id=767740490
Automatic Ore Pickup - http://steamcommunity.com/sharedfiles/filedetails/?id=657749341
Hunger and Thirst - http://steamcommunity.com/sharedfiles/filedetails/?id=591816613
Build Information - http://steamcommunity.com/sharedfiles/filedetails/?id=514062285
HudLcd - http://steamcommunity.com/sharedfiles/filedetails/?id=911144486
Popular Discussions View All (3)
6
Jul 11, 2020 @ 9:21pm
Suggestion: inline sprite
Digi
4
Mar 5, 2019 @ 10:06pm
Space text shadow and immediate draw call
Digi
0
Mar 2, 2018 @ 10:14pm
Suggestion: HUD standardized sections
Digi
< >
431 Comments
Digi Feb 2 @ 8:23pm 
That happens with any mod because DS is broken, see #help-for-community-servers-se's first pin in keen's discord ( https://discord.gg/KQt7TFtd )
AggressiveRock Jan 26 @ 6:43am 
My server crashes on startup with this mod and only this mod enabled. The server starts up correctly without it.

Exception while loading world: Value cannot be null.
Parameter name: path1
DraygoKorvan  [author] Nov 29, 2022 @ 3:37pm 
If it says mod settings, then its working. If there is nothing there, then no mod is using this mod that adds things to the menu.

This is an API mod, it doesnt do anything on its own.
Bogshorn Nov 29, 2022 @ 1:57pm 
Hi DraygoKorvan, I tried using the mod menu and it did not work. When I press F2, all it says is mod settings and nothing else. I tried deleting the file you suggested and it did not work. Any suggestions? Thank you
Dominus Nov 26, 2022 @ 10:47am 
Outstanding. Thank you sir.
DraygoKorvan  [author] Nov 26, 2022 @ 10:43am 
it does not.
Dominus Nov 26, 2022 @ 10:39am 
Does this api conflict with the Rich Hud Master api? Looking to add this for the block info mod but my server is already using rich hud master for configurable parameters. I don't want to brick my players world if there's a conflict.
All_HafRA{KB@ART} Nov 25, 2022 @ 11:32pm 
Hello. Can you give me any version of this mod for 2021 or even 2020, please? I have the latest patches of the game working incorrectly, so I have to stay at 1.197, and the latest text hud api doesn't work there anymore, but an awesome hunger and thirst mod depends on it.
DraygoKorvan  [author] Nov 13, 2022 @ 4:16pm 
should be. Any mod that uses it should list it as a dependency so it should automatically load.
ThePropheticWarrior Nov 13, 2022 @ 1:18pm 
I have this mod selected in the modlist, but the plugin manager decided to select this automatically too. Would it be safe to de-select it in the modlist, if it's already loaded at game start (not the game save)?