Поиск по STEAMB

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

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

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

Меню

Скрипты

FOC My Buddy - Follow Companion Drone AI

Положительные голоса99%83 голосов игроков
Подписчики2,6 тыс.2 558 в Steam Workshop
Размер файла509,92 КБЗагрузка через Steam
Обновление автора22 дек. 2020 г.Дата обновления материала

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

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

О материале

«FOC My Buddy - Follow Companion Drone AI» — материал мастерской Space Engineers. Моды, чертежи кораблей, скрипты и миры для Space Engineers. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.

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

About:

Script to follow a player around. It's a mostly functional derpy drone script to get your drone to follow you around and bash into things. Range is limited to sensor detection which is 50 meters.

An overly complicated script which reads the sensor data for last detected entity and does some basic vector math to adjust the entity position. Afterwards it loads adjusted vector as a GPS location into the Remote Control block and sends it to the location!

I've been working on attempts at super cool drones to do tons of things and this is as far as I got. This is more or less some code I've been testing to make block tagged naming a little easier whether looking for specific tagged blocks or randomly grabbing a block, saving data into storage and customdata, learning/understanding vector math, button toggles, argument fun, etc.

Yes it's been done before, but I didn't see any on the workshop that were up to date and working. Looks like one of the others was updated! Behind You

Setup

  • You need a sensor! We'll set up the Max Detection ranges if you didn't!

  • You need a Remote Control block, we'll mess with "Flight Mode" being set to "One Way", Collision Avoidance and Precision are at your preference.

  • Thrusters to move around!

Configurations

If the programmable blocks CustomData field configuration settings will be loaded in there. If you make any changes be sure to recompile or run the program with "LoadConfigs" as the argument. Here is an example of the configurations loaded into the CustomData field. CheckDistance = 6 AltitudeDistance = 3 BehindDistance = 4 Hybernate = false VelocityPrediction = true LocalGrid = true WriteDisplay = true PriorityTarget = none

  • CheckDistance - The distance in which the drone will start to follow you in meters. If you are more than 6 meters away, or the number set for CheckDistance, the drone will start following you! There has also been a failsafe added where your drone will also use this number to check if it should stop following you and switch the autopilot off in case the autopilot has lost it's mind. (Might be a bug in the script where it take a few cycles with VelocityPrediction enabled, I think it's something with how I tried to optimize the routines)

  • AltitudeDistance - The height offset, in meters, the drone will attempt to get to in relationship to it's target while in gravity.

  • BehindDistance - How far back your drone will try to stay from you in meters. In gravity the offset should be perpendicular to the direction of the gravity vector or ground. Your drone may stop before reaching this distance depending on the CheckDistance and the delays between script executions.

  • Hybernate - This will toggle the drone to follow you or stay put for a bit. This should be triggered with an argument either ToggleHybernate, HybernateOn or HybernateOff. If you are going to mass produce companion drones you may wish to set this to false to keep your drones from running off of the assembly line. This configuration is a boolean variable in the script and can be set to true or false.

  • VelocityPrediction - This is an experimental setting, use it at your own risk. I had a lot of fun testing this setting and am not sure how it will react with all drones. Basically what it does is uses the velocity vector to semi predict where you are going. Since this script uses the remote control block to set waypoints the locations have to be offset quite a bit for the remote control block to keep it's speed. If you slowly accelerate sticking within the 50 meter sensor limit your drone should continue to follow and keep up with you at a speed of 100m/s! It may take some getting used to and slight variations with your direction and the drones may be slightly off you'll need to adjust your direction to help the drone stay in range. One of the problems that makes this setting a bit iffy is we're triggering this script at the longest update cycle of 100 ticks, which is just over a second, any big changes like slamming on your dampeners when going 100m/s may confuse the drone. Be sure to set your drones antenna range to at least 3km as the tick delay may confuse parts of his miniature brain. If you do slam on your dampeners stay put for a minute your drone should go to the last location he saw you at!, just be careful he might be coming in too fast and not notice you in time to stop.

  • PriorityTarget - This is something I wanted for a while, your drone can now distinguish between you and another player! This is mainly useful for multiplayer where everyone in your group may want their own follow buddy. Previously the drones would follow the last detected sensor target. I also recall issues with drones sometimes trying to follow dead wolves or saberoids, this should fix that too! This should take your steam name, not 100% sure, and it is case sensitive! If you are having problems with this the script should list all the detected entities if the priority target cannot be found, so skim that detailedinfo section in the terminal for your name and related messages!

Setup Optional

  • Multiple Sensors and Remote Control Blocks should have MyBuddy or a random one will be used.

  • Want it to play a cool drone sound when it's trying to follow you? Set up a sound block with one of the in game drone sounds on a 30 minute loop! Add MyBuddy to the name to target a specific sound block.

  • Want the info from the terminals detailed info section on an LCD? Place an LCD on your companion and add "MyBuddy" to it's name.

Arguments:

  • ToggleHybernate - Used for button control to enable/disable follow mode.

  • HybernateOn - Requested Option to enable hybernate mode, no toggle.

  • HybernateOff - Requested Option to disable hybernate mode, no toggle.

  • Goto - Sends drone to GPS location, if a player is detected it will stop heading to the route.

  • LoadConfigs - This will load any changes made to the Custom Block, recompiling the script will also load changes.

  • UpdateConfig , - Makes changes to CustomData ONLY, primarily used for debugging it's just an interface to the UpdateConfig method.

  • BuildConfigs - This will build the configurations in the CustomData field. Primary use would be debugging, another interface for a method.

  • Help - Help message basic list of arguments sent to detailed info via Echo. verboseoff to read the info

  • Settings - Writes some settings to detailed info via Echo. verboseoff to read the info

  • VerboseOn - Turns Verbose On (Default On)

  • VerboseOff - Turns Verbose Off

  • DebugOn - Turns Debug On (Default Off)

  • DebugOff - Turns Debug Off

  • Set - Change some of the settings, was primarly used before customdata configs.

  • Get - Change some of the settings, was primarly used before customdata configs and for testing.

Additional Comments:

Check out my workshop for other nifty creations! See it in action with Jeremy the derpy follow companion!

mod.io here Let me know! here is the zip file I used for mod.io here is the source cs file.

Оригинал в Steam Workshop

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

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

Настройки cookies

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

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