Autopilot Mining Drone scripted with programmable block (Upd 4: can be used on remote servers)
Фото и видео: 1 из 14. Материалы автора из Steam Workshop.
О материале
«Autopilot Mining Drone scripted with programmable block (Upd 4: can be used on remote servers)» — материал мастерской Space Engineers. Моды, чертежи кораблей, скрипты и миры для Space Engineers. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.
Описание автора
Hello, engineers!
This is the third version of automated mining drone, programmed with ingame scripting. The first one was: https://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:
A) Remember connector - You can set connector, you're docked to as your drone base connector, to which it will return to drop off ore. This function can be called from rear remote control.
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.
B) Set drilling grid - It sets entry point and angles for your mining. This function can be called from front remote control. How to do step by step: 1. Get in drones cockpit 2. Press "1" to activate front control 3. Align your ship in front of asteroid (stay approximately 50 m from asteroid surface), using camera "1" or external view. 4. Press "2" to set drilling grid. Drone starts aligning and mining automatically after that. 5. Get out of cockpit, drone will now do everything on its own.
C) Pause - this function simply pauses drone auto mode and returns control to pilot. Pause can be called from cockpit "3" or by pressing button under ship 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:
- Place new landing gear
- Include it in group "LandGears", so script can find it.
- 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:
- Place new thruster
- Include it in group "Thrusts"
- Include it in group "UThrusts", "DThrusts", "LThrusts", "RThrusts", accordingly to it's direction ("LThrusts" for thruster which moves ship left and so on)
- Recompile and launch "PBNavComp" programmable block.
Just try to experiment and comment what you think.
Update 3 Notes:
- Landing gears replaced with wheels. No more explosions while docking/undocking.
- Large Thrusters replaced with small thrusters, cause they're more reliable.
- 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.
int Clock=20; // This is system clock var determining how frequently navigation script will be executed. Use values from 1 to 60. For UPS=60 (Simulation speed = 1) 60 means 1 run/second, 20 - 3 runs per second. For lower server performance like "Space Central Europe" 20 can be 1 script run per second.
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;
for "FOHSE":
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.
Upd. 4.1
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.
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.