space engineers скрипты для дронов
Подпишитесь, чтобы загрузить
Advanced Combat Drone Script (800m target acquisition range)
This script allows you to create drones which will travel until coming unto 800 meters from an enemy grid, at which time the drone will engage and pursue the enemy. This drone system uses turret targeting in order to lock onto enemies. In other words, the drone will know where the enemy is by looking at the angling of the turret. Additionally, this script also comes with a few other extra features.
NOTE: Do not attempt to use this script in small ships, the variables needed to make this work are only available in large ship turrets.
1. Firstly, add a remote control to your craft. Simply name this, «Remote Control». Make sure it’s facing forward correctly.
2. Now, add a merge block. Name this, «DroneMerge 1».
3. Add all the forward thrusters you wish to have. Make sure that each one of these contains in their name «ForwardThruster»
4. Add 3 gyroscopes. Make sure they are facing forward in accordance to your remote control. Name one of these, «GyroAzimuth», another one «GyroElevation», and finally the last one’s name does not matter.
5. Add a turret, making sure that when you place it, it is facing in the forward direction. Name it «GuideGun». The range of this gun determines the range of your drone, so it is good idea to set it to 800m.
6. Now, add a programming block, and import this script. In the Programming’s block terminal, there is a space labelled Argument. You may add the arguments denoted below here.
7. Add a timer block. Now, click «Setup actions» in it. Add to the toolbar below, firstly the programming block, with the «Run with Default Parameters» command. Secondly, to the toolbar you must add the timer itself, with the «Trigger Now» command.
8. (OPTIONAL) Add a sensor block, named «Sensor». Whenever this activates, the drone will stop itself, in order to avoid collisions.
9. (OPTIONAL) Add one or more fixed weapons, for example a fixed rocket launcher. Name them «AssaultGun». Whenever the drone has the enemy in it’s sights, it will unleash the fury of these weapons. Make sure they are facing forward, in accordance to the GuideGun turret.
10. Now your drone is complete! To deploy it, you can either do it from the drone itself or from another ship. If you wish to launch it from another ship, simply attach it via the merge block. However, beware, if you wish to launch multiple drones from a single ship, check the FAQ below. To launch the drone, simply go to the Timer, and hit «Trigger Now». The drone will travel forwards, and when in range of an enemy, it will pursue and attack.
Space engineers скрипты для дронов
/* Управление гироскопами
Выравнивание по вектору гравитации через арктангенс
*/
//объявляем блоки «Уд. управления» и «гироскоп»
IMyShipController DrillShip;
List Gyros;
float Kg = 2;
public Program()
<
//находим эти блоки
Vector3D GravityVector = DrillShip.GetNaturalGravity();
Vector3D GravNorm = Vector3D.Normalize(GravityVector);
// получаем вектора относительно блока уд. управления
float VecForward = (float)GravNorm.Dot(DrillShip.WorldMatrix.Forward);
float VecLeft = (float)GravNorm.Dot(DrillShip.WorldMatrix.Left);
float VecUp = (float)GravNorm.Dot(DrillShip.WorldMatrix.Up);
//получаем сигналы на крен и тангаж скалярным произведением.(!Тангаж перевернут!)
// на рысканье можно напроимер вывести сигнал с контроллера
float YawInput = DrillShip.RotationIndicator.Y;
// устанавливаем гироскопу текущие значения по тангажу и крену
foreach (IMyGyro gyro in Gyros)
<
gyro.GyroOverride = true;
gyro.Yaw = YawInput;
gyro.Roll = RollInput * Kg;
gyro.Pitch = PitchInput * Kg;
/* Если сигнал слабый, можно ввести коэффицент и умножить его на значения по тангажу и крену */
>
Подпишитесь, чтобы загрузить
Autopilot Mining Drone scripted with programmable block (Upd 4: can be used on remote servers)
This is the third version of automated mining drone, programmed with ingame scripting.
The first one was:
http://steamcommunity.com/sharedfiles/filedetails/?id=378190300
This version has some improvements, making it available for use in your own worlds.
It is not more divided in drone and carrier, it’s all in one ship, and this is much more easy to use.
It still has merge block, which can be used for carrying drone with other ship. Drone has cockpit inside the ship. It is not for piloting actually, cause you see nothing from cockpit.
Drone has following functions:
How to do step by step:
1. Get in drones cockpit
2. Press «2» to activate rear control
3. Dock to connector, using camera (pres «1») or external view («V»). This step can be tricky, because i’ve placed 4 landing gears around connector and they all should be locked before you connect. You must place your drone almost ideally coaxially to base connector to lock all 4 of them. These gears are supposed to prevent permanent connector crashing while drone is docking. Base connector «sucking force» is high enough to brake small ship connector exidentally after every 5-10 dockings, to avoid this drone locks landing gears first and only than turns connector on.
It means, base connector should be surrounded by some blocks to make landing gears lock possible. Use non-deforming blocks for this like glass or
catwalk plates.
4. Press «4» to remember this connector.
5. Unlock and disconnect, now drone will return to this connector.
D) Throw out stone. This function is called by bot navigation script, while mining. It does not need any control.
Load world and watch 1 drone working. And second stayng idle near your base. You can bind it to any free connector on your base or even to connector of red ship, floating nearby.
Than you can go to second asteroid and set drone to auto-mining mode.
You can copy/paste it to your own world, or make blueprint. If you change ownership of drone, don’t forget to recompile all programming blocks.
Important: Base or ship, to which drone drops off ore, must have some containers included in «BaseCargo» group.
You can also try to use it in multiplayer, but it won’t work reliably. Maybe, in next update i’ll fix most of issues and this will be useful for multiplayer too.
Of cause, this drone still needs many improvements, it has very «dirty & raw» scripting and does not handle most of exceptions.
If floating objects set to 256, sometimes floating stones block drone and it gets stuck. Docking to base connector is too slow. Optimal trajectory and speed will come later.
————————
Known issues and some repair shedules:
A )Landing gear exidetally explodes while undocking drone. I’ put these landing gears to avoid connector crashing, but it seems, that exploding connector was replaced with exploding landing gears. To repair landing gear do following:
1. Place new landing gear
2. Include it in group «LandGears», so script can find it.
3. Recompile and launch «PBNavComp» programmable block.
Try lock/unlock landing gears 2-3 times before remember connector to check If gears will or not blow up.
B) Using Large thrusters on sides of mining ship is not a really good idea, but I’m testing this drone on server with thruster limit per ship, so i can not use small thrusters. To repair broken thruster:
1. Place new thruster
2. Include it in group «Thrusts»
3. Include it in group «UThrusts», «DThrusts», «LThrusts», «RThrusts», accordingly to it’s direction («LThrusts» for thruster which moves ship left and so on)
4. Recompile and launch «PBNavComp» programmable block.
1. Landing gears replaced with wheels. No more explosions while docking/undocking.
2. Large Thrusters replaced with small thrusters, cause they’re more reliable.
3. Some changes in script to make it more universal for use in upcoming 4 and 2 drills versions.
100 shafts mined in auto mode without stucks and crit damage. It’s about 26 megaliters of ore. Took about 8 hours for 2 drones to do that.
—-
In next update i will try to make it useful on remote servers. Just need a bit more testing with system clock.
——
Upd. 4
Here comes alpha version of mining robot adopted for using on remote servers.
There are some constants in the begining of «PBHrvNav» programmable block:
———
string ShipName=»Harvester5″; // Ship Name, should be the same as beacon.
float SimSpeed=1f; // Simulation Speed, can be lower then displayed.
float GyroMult=1f; // Gyro values multyplier. Do not set over 1 if you are not sure what you do. Can be set to lower then 1 if on your serv harvester always misses connector and can’t ajust for docking.
float ThrustMult=1f; // The same as GyroMult, but determines lateral thrusters power. Not recommended to set over 1, lower values if harvester misses connector.
float BrakingDist=500; //Braking distance. If serv has higher speed limit should be ajusted to higher values.
int BrakeDelay=10; // Time needed to fully stop harvester after flight.
float DockGyroPower= 0.5f; // This param lowers gyro power on last 20 meters of docking for more precize pointig to base connector.
float MaxCargo=5; // Cargo load in % of Max capacity on which harvester will return to base.
—————————————
for «Space Central Europe» serv i’ve used folowing set:
string ShipName=»Harvester5″;
int Clock=20;
float SimSpeed=0.7f;
float GyroMult=1f;
float ThrustMult=1f;
float BrakingDist=500;
int BrakeDelay=10;
float DockGyroPower= 0.5f;
float MaxCargo=80;
string ShipName=»Harvester5″;
int Clock=20;
float SimSpeed=0.8f;
float GyroMult=1f;
float ThrustMult=0.6f;
float BrakingDist=4200;
int BrakeDelay=20;
float DockGyroPower= 0.5f;
float MaxCargo=80;
As always your reports are welcome. Have fun and don’t get servers admins too angry by breeding this molerat in high quantities.
Small 4-drills version of mining robot added. It’s better for multyplayer because produces less system load. On many servs it does almost no effect on sim speed.
———
Upd 4.2
4-drills version now uses Text panel to store data.
Also some text panel indicators added in front of cockpit.
Space engineers скрипты для дронов
Functional radar ingame programming script that uses either sensors or remote control blocks mounted on a rotor. It works with or without sensor mods.
This is an updated version of my Graphical Sensor Radar: http://steamcommunity.com/sharedfiles/filede.
This is an InGame Programming Script.
You only need:
1 Timer Block
1 Programming Block
1 LCD / Text Panel
1 Remote Control Block
(1 Power source, obviously)
1) Put the script in the programming block
2) Put the programming block in the timer
3.
Previously titled: «Whip’s Planetary Bearing & Compass Script»
Update the script if your turrets aren’t responding (with Auto Target off or without sensors).
> Read the full guide to the GFCS script here.
This is a modified version of the BlueG_Radar mod by BlueG.
This version is meant to be used with the [url=http://steamcommu.
This is a script for programming blocks. It will not show up in your mod list, it will only show up in your scripts list when you edit programming blocks.
Decorative Digital Clock
Displays the real Local or UTC Time
I know you could just use the Steam Overlay to check the time 😉
UTC time may be swapped with Ingame Time at some point if i can figure out a satisfying result.
Large Grid: 1x1x1
Small.
The new major update of this script was released here:
I hope you will like it! Merry Christmas everyone!
Lock-on script to be used on Semi-Active Radar Homing Missile Systems (SARH). This script is revamped again for optimized and accurate lock-on plus more simple setup.
GetFreeDestination is officially removed from game, therefore this item is now only a relic of the past.
NEW! Checkout my new replacement script, the Camera Raycast Lock-On Script:
This mod is obsolete, use the vanilla inter-grid communication system.
This mod allows you to send data between antennas/ships ingame. While some ingame scripts already send data between grids they use exploits in the programmable block which wil.
This script draws the Floor Plan Layout of your ship to a Text Panel. It is customizable with zooming, panning and manipulation of ship layout. Now drawn with Monospace Font.
This is a Vanilla Script. NO MODS are required.
NOTE: Some modded blocks will cause this script to break.
Second note: This script has been in a pretty stable place for a while, and I really want to write it again from scratch (since I was still learning C# when I wrote this). That said, I am going t.
This script adds support for CustomData of LCDs instead of deprecated Private Text.
Use Public Title to enter commands as normal or use UseTextCommands command and
enter commands to CustomData of LCD just as you did with Private Text before.
NOTE: this version has been superseded by my EZ turret AI, and is held for archive purposes only, please see my workshop for the latest version!
The arms race continues! This time with a new script that will give AI to any playe.
For those of you coming from the LSG video, here’s a link to my forum article. If you need any help, don’t be afraid to ask: http://forums.keenswh.com/post/multiturret-control-system-control-multiple-turrets-with-your-mouse-code-published-7262456
This mod adds the ability for Timer Blocks and Programmable Blocks to be triggered/ran when the input (key/mouse/gamepad/game control) is pressed and/or released by a player controlling a cockpit/RC/seat in the same grid system.
The system is very flexi.
This script will allow you to add as many rotors as you like and then control their angles
in one easy step.
* Add the rotor(s) you want to control to th.
V 2.01: script now also works if you have set the game to run in other languages than english
Version 2.0 notes
Version 2.0 is here! The new version allows you to set pretty much every slider in the game, for example allowing you to cha.
Formerly Named «Whip’s Rotor Thruster Manager»
Ship Health Bars is a simple mod that gives a Health-Bar functionality to the vanilla beacon block.
This script enables you to save a lot of hydrogen when landing on a planet
Control all your fixed weapons from a single block!
Place a weapon control block on your ship.
Add it to your cockpit toolbar.
When you select the weapon control block the HUD will appear.
Right click to change fire group, left click to fire.
.
put your thrusters on rotors!
This is the ship speed mod to end all ship speed mods.
1. Programming Block
The programming block needs to be loaded with «Inventory Viewer», checked (compiled), and remembered.
This version is held for ARCHIVE AND REFERENCE ONLY
NOTE* This script is now superseded by my latest guided missile script and is being held for archive only
Before accusing me of removal of something from the mod, read this.
Donation is now possible! Here’s the [url=htt.
Updated and Working again 🙂
HudLcd displays the Text of selected LCDs on your HUD!
This is an InGame Programming Script that simply uses a sensor mounted on a rotor. It can detect anything that sensors can detect, including spiders. It works with or without sensor mods.
You only need:
1 timer block
1 programming block
1 rotor
1 s.
[img=https://i.imgur.com/Vw0h1Xy.png]
This code allows you to make automatic drop pods that will safely land themselves. This is a mu.
Everything you will ever need to know about your ship and station displayed in real time on LCD panels in any vanilla games. modded games and servers! Now with cockpit panels support!
v:2.0178 [latest game version compatible, workaround for rotat.
Lidar Homing uses the latest Camera Raycast Lock-On. This is a Fire and Forget missile script. After initial aiming and achieving lock-on, missile will be fully autonomous and tracks the target with leading intercept.
NEW!! Revamped Guidance Syst
This script is used to launch missiles guided by the Easy Lidar Homing Script. It is recommended to use this script for launching said missiles.
Easy Lidar Homing Script can be found at:
This script is used together with the Easy Radar Homing Script, to get the missile lock-on status:
Easy Lidar Homing Script can be found at:
**Translated by Google Translation**
Terminal Block Manager is an ingame script that allows non-programmer players write their own scripts for terminal blocks in a very simple and easy to learn language.
Since Space Engineers update 1.190, this script will give you warnings when installing. They’re nothing to worry about. It doesn’t affect the script. I’ll fix it shortly.
Tired of wasting fuel when leaving a gravity well? What you need is cruise contr.
Rdav’s AI-Autominer Script allows any player to convert any vessel to a fully automatic mining ship capable of automatic resource gathering and drop off.
This script measures the height from ground or sealevel and triggers a timer block if a certain height was reached. This can be great for automating starting or landing sequences.
Version: 1.1.1
Date: 2019-04-09
This is the Manual Refresh version of the Floor Plan Script Mk1. It functions exactly the same, except that the LCD refresh is not automatic. You need to triger the REFRESH command to have the script updates its LCD Panels.
This script prints bars of your container fill level on a LCD that is directly attached to it. Optionally it will show the name and the percentage of the container. It will also colorize the text depending on the fill level.
(Previously titled: «Whip’s AI Rotor Turret Control Script»)
In the documentation below, «rotor» refers to both rotors and hinges! This is because the game considers hinges to be just fancy sideways rotors.
This mod adds target lead indicators to the HUD. They work with any weapon and any other HUD mod!
A complete rewrite of my Smart Turrets mod, Smart Turrets 2 is a turret AI overall that give you an excessive amount of control over exactly what your turrets are shooting at.