Поиск по STEAMB

Игры и программы по онлайну, скины по объёму продаж

Ничего не найдено

Попробуйте другое название или переключите категорию.

Меню

Моды

BlueG_Radar (stable; see description for news)

Положительные голоса99%111 голосов игроков
Подписчики2,3 тыс.2 280 в Steam Workshop
Размер файла399,63 КБЗагрузка через Steam
Обновление автора29 янв. 2015 г.Дата обновления материала

Изображение 1 из 3. Материалы автора из Steam Workshop.

Изображение 1 из 3
Установить через Steam

О материале

«BlueG_Radar (stable; see description for news)» — материал мастерской Space Engineers. Моды, чертежи кораблей, скрипты и миры для Space Engineers. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.

Описание автора

This version is now considered stable and won't change unless a major bug is found. I am planning the next version and have begun a discussion thread on Keen's forums to gather input for it. The address is: forums.keenswh.com/post/next-version-of-bluegradar-comments-and-suggestions-7341887?pid=1286594646#post1286594646

***** Update 1/29/2015: The options for Detect Players and Detect Floating objects now work as expected (detecting players and floating objects respectively). This wasn't done previously for historical reasons. Before Keen added "Detect Friendlies, etc." I was using those settings to determine whether to detect friendlies/enemies (which I thought was more useful than players/floating objects), but hopefully no one is still using it that way. And now that someone has presented me with a use case for it (a way that they plan to use it), I was motivated to change it. *****

***** Update 1/29/2015: You can now have the sensor report GPS coordinates. Use the [radarg] tag on the sensor instead of [radar]. If used with the "+" flag, then the "g" flag should appear first. The "g" and "s" flags can not be used at the same time. You can also add the "g" flag to the radar (beacon) itself. This will cause its GPS coordinates to be reported on the beacon (instead of the sensor). Oh, and minor change: you can also put parenthesis around the "g", "s" and "+" flags, so you can use [radar(g+)] instead of [radarg+], but you don't have to. *****

Special thanks to midspace. His (her?) answering my question on the forums helped me figure out a problem I was having with floating objects.

I have posted an example of how to use this mod to create a homing missile at https://steamcommunity.com/sharedfiles/filedetails/?id=373595045. Also, checkout cookiehunter's work. He posted a working torpedo under the How Do You Use discussion. Whereas my torpedo was kept very simple as an example to understand how this mod works and the basis for creating a torpedo, his torpedo is more complete and better behaved.

Key Features

  • Long range *

  • Detects both asteroids and ships

  • Distinguishes enemy ships from friendly or neutral

  • Result can be accessed from script

  • Can select up to 20 closest targets matching criteria (with multiple sensors or by changing settings through script)

  • Built on the beacon, so it requires a working block and power proporitonal to its range (for those who want at least some realism)

  • The radar can detect any object that has been loaded by the game within the beacon's range. The game, however, only loads objects within the range determined by the View Distance setting under Advance Settings for the world. The radar can not detect what isn't there (what the game hasn't loaded).

About

Allows beacons to be used together with one or more sensors to form a radar system.

This mod is in alpha. It is feature complete (for its current release) and has been tested, but may still have a few bugs.

How to Use

The beacon must have the tag [radar] in its name, be functional (built) and enabled (turned on). Its position and range will be used as the radar's position and range. This way, power consumption varies with range.

The sensor must also have the tag [radar] in its name and be functional (built), but does not need to be enabled (does not need to be turned on). Only sensors that are friendly to the beacon will be updated. That is, the sensor must be owned by the same player as the beacon or shared through a faction.

The items selected for detection by the sensor will be reported to that sensor, with the exception of the player and floating object options. This includes the Detect Owner, Detect Friendly, Detect Neutral, and Detect Enemy settings.

Sensors normally report the nearest item that matches their criteria. You can use [radar1] to skip the closest item, [radar2] to skip the two closest items, and so on, all the way up [radar19], which will skip 19 items. In this way, you can get the 20 closest items, if you really want to.

Normally, the sensor updates its targets once a second. This can change what object is selected as closest, 2nd closest, and so on. If you'd like it to keep tracking the same object, use [radar+], [radar+1], [radar+2], etc.

When a radar sensor has a match, a vector will be appended to its name that gives the coordinates of the item found. These coordinates are relative to the sensor. Space Engineers uses a right handed coordinate system. The positive X axis is to the right, the positive Y axis is up, and the positive Z axis is backwards. These are all relative to the direction the sensor is facing. So, if the sensor is facing the object detected, it will have a negative Z coordinate (see the picture above).

If you prefer, you can get spherical coordinates. Put an "s" immediately after the word "radar" in the sensor's tag. So, [radar] would become [radars] and [radar+1] would become [radars+1]. The coordinates will be reported as <distance, yaw, pitch>. Yaw is positive if the object is to the right and pitch is positive if the object is up. Both are given in degrees. These may be easier to use both when looking at the coordinates visually and when writing scripts.

Currently, the system is designed to work properly with only one radar antenna per cube grid. Otherwise, all radar antennas will try to set all radar sensors (probably at different times too).This may be fine in some scenarios (if it doesn't matter which antenna sets the sensors).

Sample Code for Programmable Block

Here is some code that can be used in a programmable block to retrieve the coordinates reported by the radar system (in this example, the sensor was named "Sensor [radar]" before it was modified). You can also look at the example world that I made. The miner in that world has a programmable block that uses the radar system.


string sensorBaseName = "Sensor [radar]";
System.Text.RegularExpressions.Regex rxVector = new System.Text.RegularExpressions.Regex( @"\<([+-]?[0-9]+(?:\.[0-9]*)?),([+-]?[0-9]+(?:\.[0-9]*)?),([+-]?[0-9]+(?:\.[0-9]*)?)\>" );
List<IMyTerminalBlock> buffer = new List<IMyTerminalBlock>( 1 );

void Main()
{
    GridTerminalSystem.GetBlocksOfType<IMySensorBlock>( buffer, IsRadarSensor );

    if( buffer.Count > 0 )
    {
        var match = rxVector.Match( buffer[0].CustomName );

        if( match.Success )
        {
            float x = Single.Parse( match.Groups[1].Value );
            float y = Single.Parse( match.Groups[2].Value );
            float z = Single.Parse( match.Groups[3].Value );

            // do what you want with the coordinates
        }
        else
        {
            // the radar didn't find anything
        }
    }
}

bool IsRadarSensor(IMyTerminalBlock block)
{
    return block.CustomName.StartsWith( sensorBaseName );
}

License

The BlueG_Radar Mod is the product of Bradley Regula.

(c)2015 by Bradley A. Regula

BlueG_Radar Mod by Bradley Regula is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/.

This is in addition to rights and licenses resulting from the publication of the BlueG_Radar Mod on Steam's Workshop.

By the way, I'd love to know how you use this mod. It will help me plan new features or future mods. ^^

Оригинал в Steam Workshop

Как установить и запустить

Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.

Настройки cookies

Вы можете изменить выбор в любой момент. Отказ от аналитики не ограничивает доступ к сайту.

Технологии, провайдеры и сроки хранения