Space Engineers

Space Engineers

339 个评价
Whip's Missile Status Script (for WHAM)
2
4
2
   
奖励
收藏
已收藏
取消收藏
标签: visualization
文件大小
发表于
更新日期
557.403 KB
2020 年 11 月 14 日 下午 7:33
2024 年 4 月 8 日 上午 12:54
12 项改动说明 ( 查看 )

订阅以下载
Whip's Missile Status Script (for WHAM)

在 Whiplash141 的 1 个合集中
Whip's Scripts
22 件物品
描述
Whip's Missile Status Script


  Description
This script provides a graphical display of the status of WHAM missiles on LCD panels or blocks with multiple display surfaces like cockpits. When a particular missile is detected by the script, it will display a green missile icon and, when it is missing, it will display a red icon instead (by default). You can customize things like color and position in the custom data of the programmable block and display screens.


  Setup Instructions
General Instructions
  1. Place this script into a programmable block
  2. Add text panels, LCDs, and/or blocks with multiple display screens to a group named "Missile Status"
  3. In the Custom Data of the display screen blocks, configure their custom data to display the missile icons that you want. See the section Custom Data Config - Display Screens below for more details.
  4. To process any block changes or Custom Data changes, you must recompile the script

Custom Data Config - Display Screens
This section covers the configuration of the Custom Data of the display screen blocks.
  1. To add a missile icon to a display screen, open the Custom Data of the block and add the WHAM missile group name in brackets. For example:
    [Missile 1]
    The name needs to match a WHAM missile name tag exactly for the script to properly detect the missile.

  2. Recompile the code and then re-open the Custom Data of the block.

    If the block has multiple display screens, the Custom Data should now look like this:
    [Missile 1] Sprite location=0, 0 Sprite scale=1 Sprite rotation (deg)=0 Screen index to display on=0
    Set the "Screen index to display on" to the particular screen that you want to display the icon on.

    If the block has a single display screen, the "Screen index to display on" key will not be present:
    [Missile 1] Sprite location=0, 0 Sprite scale=1 Sprite rotation (deg)=0

    Note: The "Sprite location" coordinates range from -1, -1 (top left of the screen) to 1, 1 (bottom right of the screen). You can use decimals to place it somewhere in-between. The first number is the horizontal (X) offset, the second number is the vertical (Y) offset.

  3. Recompile the script to process any Custom Data changes.
  4. Repeat this process for all the missiles you wish to display.

Custom Data Config - Programmable Block
This section covers the configuration of the Custom Data of the programmable block that runs this script.
Note: A programmable block can also be used for its display screens as well.

Programmable block Custom Data will automagically be populated with the following default config the first time it is compiled:
[Missile Status Screens - General Config] Status screen group name=Missile Status Missile group name tag=Missile Show title bar=false Title scale=1 Missile ready color=0, 75, 0, 255 Missile inactive color=75, 75, 0, 255 Missile fired color=25, 25, 25, 255 Title bar color=25, 25, 25, 255 Title text color=150, 150, 150, 255 Background color=0, 0, 0, 255 Global sprite scale=0.25 ; You can create your own sprites using the SE Sprite Builder ; https://gitlab.com/whiplash141/spritebuilder/-/wikis/home Sprite list=
You can change these if you desire, then recompile the code to process changes.

If you want to use a custom sprite for the missile icon, you can use the custom data export of the Sprite Builder[gitlab.com] app to set the Sprite list key accordingly. If you do not care, just leave it blank.


  Author's Notes
If you have issues are need help, please leave a comment in the "Help/Questions" discussion thread for this script.

Ship pictured in the thumbnail is the Komodo Guided Missile Destroyer Mk 2.

(Do not reupload without permission, not even to mod.io)
热门讨论 查看全部(1)
31
2022 年 1 月 29 日 上午 5:59
置顶: Help/Questions
Whiplash141
59 条留言
Whiplash141  [作者] 10 月 3 日 下午 10:27 
The script works by looking for a programmable block contained within a block group named "Missile #". Since Rdav's script uses exploits to circumvent the requirement of a programmable block for communication on the missiles themselves, this script will not correctly detect those as valid missiles.
MUFF-N-MAN 9 月 30 日 上午 8:35 
I'm currently on a crossplay ds, will this work without WHAM? We are currently running vanilla and RDAV missiles, can this script be set up to detect them? Thanks!
Whiplash141  [作者] 7 月 13 日 下午 12:33 
can you show me your custom data in the help/questions thread?
prexray13 7 月 13 日 上午 9:14 
i am having a problem i can only see 1 missile and and it doesnt show green even though the missile is on the ship
mhwyoshi 1 月 8 日 下午 5:00 
How do I put custom data config into the screens of the fighter cockpit?
mhwyoshi 1 月 8 日 下午 4:59 
So I got it showing on one screen, but I only have the cockpit and I wanted to show all the missiles on the upper left screen. It says that there’s one available, but it doesn’t show where it is. I tried adding “Missile Status” the cockpit name but that doesn’t seem to do anything. I’ve tried putting it in the custom data of the programmable block below the current data of it, and that didn’t seem to do anything. I also tried putting it in the custom data of the cockpit above and below the current lamp information and it still doesn’t show anything. I tried messing with the numbers and that didn’t do anything. What exactly am I doing wrong? I did also recompile the programmable blockevery time I change things.
Whiplash141  [作者] 2023 年 8 月 12 日 下午 8:40 
I literally just spawned that ship and the screens work fine. The script is not broken, I'm actively using it.

If there is no valid custom data config in the screens themselves, they will not be registered as a text surface.
Da_MLG_man 2023 年 8 月 12 日 下午 5:45 
Da_MLG_man 2023 年 8 月 12 日 下午 5:44 
I should mention the script is broken in the Kimodo Missile Destroyer as well, which was an example craft you linked in at the end of the guide to set up a WHAM/LAMP missile launcher.
(this is the ship)https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2108857776
Da_MLG_man 2023 年 8 月 12 日 下午 5:06 
Yes, I put the config in custom data. The script is Echoing "0 text surfaces detected" but not the "block group <name> not found" error, indicating it did find the block group but apparently could not find the text surfaces inside the block group.