Space Engineers

Space Engineers

Not enough ratings
Froid's Fleet Threat Indicator Setup Guide
By Sigmund Froid
A quick setup guide for my fleet threat indicator script, as it may be a bit confusing for players that aren't used to using scripts.
   
Award
Favorite
Favorited
Unfavorite
Intro
First of all I'm pretty bad at explaining stuff so please ask me if something is unclear. I'm not a native speaker which doesn't help either.

Prerequisites
  • Obviously a programmable block with the script. (get it here)
  • Atleast one WC weapon.
Initial Setup
Build any amount of weapons, soundblocks, lights, and LCDs/Blocks with LCD screens. The weapons won't need any further setup. Add the respective tags (see at the section Configuration) to the soundblocks, depending on their function. The script won't change their range and volume.

Light Setup
Set the lights to the color you want them to be if the alarm is inactive. Set them to off if you want them to be off if the alarm is inactive. The script will attempt to restore these settings. Add the Lights name tag (see at the section Configuration).

LCD setup
If your LCD screen is a normal screen (i.e. Text panel, Sci-Fi LCD screen, Corner LCD) just add their designated tag (see at the section Configuration). If it is for example your Cockpit you first want to go into the Custom Data and add an integer to indicate which screen should be used. See the ids in the following picture:
Custom Data if you want to use the top left screen:
Afterwards add the wanted tag to the block. You currently can't mix different LCD tags on the same block.

After all this recompile and after about 10 seconds it should work.
Spelling of the tags is key!
Information in the PB
The programmable block will display all detected threat's threat level and the integer sum of those, in the example it's just about ten.
After you inseted the script for the first time it won't display anything, until an enemy enters weapon range.
Configuration
The script includes several config options:
Script config
The first few lines of the script contain the config options, which are as follows:
Name
Default value
Description
AlarmString
[Alarm]
This string will be used to find the soundblocks that should play the alarm during heavy battle
AmbientString
[Ambient]
This string will be used to find the soundblocks that should play ambient music during battle
ProximityString
[Proximity]
This string will be used to find the soundblocks that should play an alert whenever the threat level rises, i.e. when a new ship enters weapon range
ALCDString
[Alarm-LCD]
This string will be used to find the LCDs that should display a danger sprite during heavy battle
TLCDString
[Threat-LCD]
This string will be used to find the LCDs that should display the relative threat level towards the enemy fleet
ALightsString
[Alarm-Light]
This string will be used to find the light that should blink red during heavy combat
warnThreatLevel
7
This integer determines the lowest threat at which the alarms should sound. Set it to 0 to always activate the alarm when in combat, set it to more than 10 to disable it
Debuging
  • The programmable block displays Total Threat: -1 when no enemies are around.
    Not sure why this happens, however it doesn't impact the functionality as internally a threat level of -1 equals no detected grids.
  • The programmable block displays WeaponCore Api is failing! Make sure WeaponCore is enabled!
    The script can't operate if WC is broken or no weapon is installed. If you have this error and this message displays follow the steps in the pinned discussion of WeaponCore.
  • The programmable block displays WcPbApi :: Couldn't find <some name> delegate of type <some type i.e. Sandbox.ModAPI.Ingame.IMyEntity> or WcPbApi :: Delegate <some name> is not of type <type1>, instead it's <type2>
    This means DarkStar changed the API. Report these immediately!
  • I can see an enemy but the script still displays No threats in sight
    The enemy ships have to be in weapon range to detect the enemies.
And that's it!
Sorry for my spelling and weird grammar, I'm no native speaker and have some stupid manners of speaking. If you don't understand something, tell me in the comments, and I'll try and fix it. If you need to contact me, don't send me a friend request, contact me via comments first!

Want to learn how to use the WeaponCore PB API?
Check this out: https://steamproxy.net/sharedfiles/filedetails/?id=2178802013

My Workshop
https://steamproxy.net/sharedfiles/filedetails/?id=2197435489

Support Darkstar (Patreon)[www.patreon.com] (the author of WeaponCore, which makes this script possible)