Space Engineers

Space Engineers

395 értékelés
Easy Lidar Homing Script
2
2
2
   
Díjazás
Kedvenc
Kedvenc
Törlés
Fájlméret:
Közzétéve:
Frissítve:
94.705 KB
2016. nov. 27., 3:14
2019. dec. 21., 18:18
77 változásjegyzék ( megnézés )

Feliratkozás a letöltéshez
Easy Lidar Homing Script

Leírás
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 System to use better intercept calculations. Missile is now MUCH HARDER to Dodge!
https://youtu.be/3LRfwtnRlOk


This is a Vanilla Script. NO MODS are required.

See Homing Modes for the different ways this script can guide the missile (Raycast Lidar, TV Guided, AI Turret, GPS etc)


The Complete Setup Guide for this script can be found at:
http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1211340504


Tutorial Video can be found here:
To be released on weekends.



NOTE: Timer Block NO Longer Required! Script loops itself automatically.

WARNING: Camera Panning Mod messes with this script! This is an API limitation, nothing can be done.

WARNING: Camera Crosshair is highly misleading and may not be the actual aim point, causing off center aiming and unable to lock-on.

WARNING: PID Values have been Re-Normalized! If you have tweaked AIM_P, I, D and LIMIT before, you need to convert it from angles to radians (i.e. divide by 30 then multiply by Math.PI).

NEW: useOffsetTargeting and useOffsetRaycasting flag available to enable homing in on specific spots of the target instead of its center. Available for all Lidar Type Modes. See Custom Data Configuration Section for more info.


Best used together with the Launch Control Script to launch multiple missiles:
http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=691441036

And also with Missile Status Script to get missile lock-on information:
http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=702255497



Demonstration Builds:

Red Ship Mech by Halipatsui:
http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1285924680

X479 Cruiser Rabblerouser by Monorchid:
http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1382285229

Stalker Skyfighter:
http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1109370030

Stalker Spacefighter:
http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1109370333

Twinhydro Mobile SAM:
http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1221350549

Patriot Mobile SAM:
https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1230416099




Available Homing Modes

(Lidar means Camera Raycast)

[Mode 0] Lidar Homing
Lidar Homing using launching ship's R_LIDAR for initial lock-on and R_FORWARD for aiming.

[Mode 1] Lidar Homing, Initially GPS Targeted
Lidar Homing using coordinates from launching ship's R_TARGET for initial lock-on.

[Mode 2] Lidar Homing, Initially Camera Guided
Lidar Homing using launching ship's R_LIDAR for initial lock-on and R_FORWARD for aiming with initial Camera Guidance. R_FORWARD can also be a Turret.

[Mode 3] Camera Or Turret TV Guided
Camera Or Turret Guided using launching ship's R_FORWARD for direction tracking. R_FORWARD can also be a Turret.

[Mode 4] GPS Cruise
Homes in on the GPS Coordinates set by the R_TARGET Text Panel.

[Mode 5] Shipborne Turret AI Homing
Turret AI Homing Mode using launching ship's R_DESIGNATOR AI Turrets for Guidance. Multiple R_DESIGNATOR are allowed.

[Mode 6] Fixed Glide
Homes in based on the direction the R_FORWARD is facing during launch. Direction is fixed after that.

[Mode 7] Semi-Active Lidar Homing
Lidar Homing Mode solely using launching ship's R_LIDAR for lock-on and R_FORWARD for aiming (Semi-Active Style Guidance).

[Mode 8] Turret AI Homing
Turret AI Homing Mode using missile's mounted AI Turret for Guidance.

[Mode 9] Turret AI Homing, Initially Camera Guided
Turret AI Homing Mode using missile's mounted AI Turret for Guidance, with initial Camera Guidance using launching ship's R_FORWARD. R_FORWARD can also be a Turret.



Important Notes

1) Default maximum lock-on range is 3km. You can increase this by setting LIDAR_MAX_LOCK_DISTANCE in metres. Longer range means more delay between beam traces as Camera cooldown is longer.

2) For testing purposes, missile is set to lock on to ANY grid it can raycast to. For actual PvP use, write this line to the Custom Data of the script's PB to make it only lock on to enemies:
excludeFriendly=true


Proximity Sensors

This script supports the use of raycast cameras as proximity fuses.

See Guide.

Custom Data Configuration

You can set the Custom Data of Programmable Block to specify various settings or change script variables, avoiding the need to edit the script everytime when updating to newer script versions.

See Guide.

Inter-Grid Communication

This script supports Inter-Grid Communications.

See Guide.

Missile Deployment Commands

Missile can be set to perform certain actions based on range to target and other measurements.

See Guide.

In-Flight Missile Command

Missile can be aborted in-flight or change to GPS homing.

See Guide.

Dynamic Configuration Command

You can set the Argument of Programmable Block to a specific command string to dynamically change missile behavior during launch.

See Guide.


IMPORTANT: AVOID using useOffsetRaycasting=true as it will cause lock-on to lose lock easily, since it will not raycast the center. Let the script decide when to use it automatically instead. You can use useOffsetTargeting=true however (note the spelling, these are different parameters!)

useOffsetTargeting => Missile homes to your aim point, such as to take out specific points on a base or large targets.

useOffsetRaycasting => Missile locks on to last raycast hit point, specifically used for ships with a large hole in it (cannot lock on to middle in this case). Else this has absolutely no uses.


Others

Skybox Aurelia by AssHunter:
http://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=493552729
Népszerű témák Összes megnézése (3)
7
2020. márc. 30., 9:22
Problems with Script
DMN Nitemare
0
2020. jún. 12., 3:47
problems with custom setup
puppamilaspranga
0
2020. márc. 22., 10:53
Mode 1 doesn't work as expected
Kyr
858 megjegyzés
HydraDominatus ápr. 28., 12:38 
does anyone know how to change script so it works in situation where missile is already detached? I made it so missile runs it's PB after detachment through event controller so I can launch missiles without adding them to hotbar
Bumongus ápr. 23., 7:03 
Best bet is to take a look and see how it groups thrusters I guess... :\
It should say in the comments somewhere how it works
WardenWolf ápr. 21., 19:40 
So, running into a problem. The missile keeps misidentifying the gravity dampening thrusters as the main thrust (instead of automatically selecting based on R_FORWARD which would make sense). Your setup guide mentions correcting such automatic selections but doesn't say how.
DUBwithCHEESE 2024. máj. 22., 20:37 
distance=2
dmsrange=5
failunsafe=true
failasgroup=true
FreezingPanzer 2023. júl. 18., 21:10 
can anybody provide me what to put into the camera custom data that allows me to do the following.

the missile will be in launch bay with all warheads NOT armed. once launched it will arm it self when the missile is within 60 meters of the target.

i understand that a extra block sensor can also do the job, but i would like to do the job with the scripts custom settings.
EndoMatrixHD 2023. máj. 9., 4:27 
is it normal to not get any Lock-on sound before i shot the missile? everytime the sound yust comes aftherwards, so i dont know when it is locked on?
Plongo 2022. szept. 17., 18:48 
Hey @Alysius do you think you could update the script so it can run the custom turret controller &/or search light as the R_DESIGNATOR? Cheers
Daxter 2022. aug. 15., 7:51 
Hello. Could you add me as a friend? I wanted to talk about a new project.. I hope you can help..
Boldtaar 2022. jún. 21., 17:41 
never mind I found the problem. I had some old override in custom data field for the cameras
Boldtaar 2022. jún. 21., 15:23 
Not used this script in a while is still working?
Having problem with proximity fuse and Dead Man's Switch not detonating my Warheads