Space Engineers

Space Engineers

HudDog - dogfight tracers, lead, autoaim
Sparktite 5 Dec, 2021 @ 10:06pm
Lots of questions regarding this mod/script and how to set it up.
Hai again! :P

Alright so i got quite a few questions so imma try and format this as best i can for ya. Sorry its so long, but the build guide you provided imo seems to be quite vague, so i have no idea what im doing.

Right now first issue im concerned with is strafing. I notice using the example ship provided when im looking at an enemy and strafing and trying to shoot them, the lead/trail indicator starts facing the direction im moving. Meaning that the indicator is on the opposite side of where it should be rendering it useless whenever im strafing which is almost all the time.

Is it possible to set up other modded weapons to replace the gatling turrets? For example i have some gimbal lasers that are smaller and have more integrity id prefer to use over the gatling turrets.

What is free fall? Like what classifies as a free fall weapon, and what does changing the free fall zero distance do? How do i even change the free fall distance?

How do i lock on to a target?
What is control takeover? How does it work?
How do i enable auto trigger?
Is there a way to change virtual tracers prediction track distance on the fly in combat, say if i wanna change my weapon group to another set of weapons with a different projectile velocity/speed?
How does the weapon type auto-switch work, or what does that do?

How or where do i adjust the value for weapon velocity so that i can match the predictions to modded weapons i wanna try?
I noticed the guide says to put the code in the PB and make a group containing said PB. However, i notice that your example ship has at least 3 PBs with different scripts in them and i dont know where to get those other scripts. How do i go about setting up my ship to work like this or do i not need to?

For camera placement in optional step 4 of the build guide, um, what exactly do i do? This just says to add cameras. I need more information to go on, for example, if i didnt know better, i would think i could just add some cameras inside my ship hidden under blocks. But im assuming that wouldnt work. Where exactly should these cameras go, what purpose do they serve, how many cameras should i have? Whats the best placement for these cameras?

What does the sound block do in optional step 5?

Why is there an optional step for adding a projector? How does that affect weapon systems? What is the purpose of this projector? How does orientation matter? Where should i put this, which direction should it face, is there any other info at all that i might need to know about this step?
What is the purpose of the gyro in optional step 7? What is optimal placement for this gyro? Where should it go, where should it face? Should i consider using more gyros if my ships mass is too big or do i only need the one for this step?

Just noticed the argument reference discussion on here, but am also a lil confused on that. I think i understand how to enter script arguments, but where do i enter them. Do i add them in as new lines under //toggle:dbg in a-pipper? Or where exactly?
< >
Showing 1-9 of 9 comments
cheerkin  [developer] 5 Dec, 2021 @ 11:13pm 
> the lead/trail indicator starts facing the direction im moving
This is correct for PIP indicator. If you move left, bullets inherit left portion of your ship velocity and you need to aim to the right from target to compensate for that, placing PIPper over the target.

> Is it possible to set up other modded weapons to replace the gatling turrets?
To "replace" in what sense? If you mean gimballed mounts, then you dont even need weapons on them, they would orient towards mid axis even without weapons.

> What is free fall?
Block projectiles that are affected by gravity, like inertial torpedoes or rotor cannon shots. Free fall distance zero means assumed target distance. You change it with Q double tap.

> How do i lock on to a target?
You can't. Target data is gained from ai turrets.

> What is control takeover? How does it work?
It's aimbot essentially. It kicks in when the target is somewhat close to your forward direction. You just fly close to an enemy and keep it in the middle of the screen.

> How do i enable auto trigger?
Run the script with 'toggle:fire ' argument. It's all in arg reference discussion.

> Is there a way to change virtual tracers prediction track distance on the fly in combat
Double tap Q

> How does the weapon type auto-switch work, or what does that do?
When you fire gatling, it switches to gatling prediction, when you fire rocket, it switches to rocket type ballistics, so you don't need to tap E.

> How or where do i adjust the value for weapon velocity so that i can match the predictions to modded weapons i wanna try?
Bullet speed variable, top of the code.

> However, i notice that your example ship has at least 3 PBs with different scripts in them and i dont know where to get those other scripts.
Don't worry about them, those are another scripts that are WIP. One of them is MenuCommand, for script control convenience, you can find it in my workshop. Others are unreleased I guess.

> But im assuming that wouldnt work.
That's right, you need to place them forward-facing with no blocks in front. They are used for raycast check against the target - to filter out small debris targeted by turrets. There is min-size parameter that you can change. Reference ship is OK example of how to place them. You don't need many, 6 or so would do, but make sure that at least one cam would have line of sight to enemy in all your frontal cone.

> What does the sound block do in optional step 5?
Plays when control takeover kicks in, stops when it stops.

> Why is there an optional step for adding a projector?
It allows for projector-type of indication - you make a small blueprint that would act as your marker, and the projector would change offsets so the projection would work like a PIP/LEAD indicator. Basically you can run this script without LCDs, just with projector.

> Where should it go, where should it face?
It should face forward, towards enemy. You need only one included in the group, but of course feel free to build more, they would assist that single one anyway. The gyro is used for control takeover. Optimal placement - doesn't matter, any secure place, just orient it correctly.

> Do i add them in as new lines under //toggle:dbg in a-pipper? Or where exactly?
You can run the PB with argument, like 'command:set-value:blabla', or you can place the same line inside Custom Data - and it would be executed automatically at every start-up or recompile. Double slash comments out the line there (i.e. disables it).
Sparktite 6 Dec, 2021 @ 12:25am 
> Is it possible to set up other modded weapons to replace the gatling turrets?
>>To "replace" in what sense? If you mean gimballed mounts, then you dont even need weapons on them, they would orient towards mid axis even without weapons.
>>>IIRC the gatlings are primarily for helping with aiming using this script right? So would it be possible to use say a gimbal laser from the MA Weapons mod in place of the gatling turret? The gimbal laser effectively targets the same way a gatling turret does but just with a more limited firing angle.

> What is free fall?
>>Block projectiles that are affected by gravity, like inertial torpedoes or rotor cannon shots. Free fall distance zero means assumed target distance. You change it with Q double tap.
>>> What is a rotor cannon? I have a weapon called a rotorary auto cannon which is a fixed weapon that i fire, that does not have drop on it, i assume this is something different than a rotor cannon?


> How or where do i adjust the value for weapon velocity so that i can match the predictions to modded weapons i wanna try?
>>Bullet speed variable, top of the code.
>>> Is it possible to set up the script or the ship in some way to allow for different weapon velocities? I wanna try mixing weapon system groups that i switch between when i wanna fire say a sniper at 400m/s vs a regular gatling gun.

> But im assuming that wouldnt work.
>>That's right, you need to place them forward-facing with no blocks in front. They are used for raycast check against the target - to filter out small debris targeted by turrets. There is min-size parameter that you can change. Reference ship is OK example of how to place them. You don't need many, 6 or so would do, but make sure that at least one cam would have line of sight to enemy in all your frontal cone.
>>> What does the min size parameter do or is that explained elsewhere? Also what do you mean to have direct line of sight from all of my frontal cone? If i have 6 frontal facing cameras, arent they all gonna have line of sight to enemies anywhere in front of me?

> Why is there an optional step for adding a projector?
>>It allows for projector-type of indication - you make a small blueprint that would act as your marker, and the projector would change offsets so the projection would work like a PIP/LEAD indicator. Basically you can run this script without LCDs, just with projector.
>>>How do i enable the projector aiming mode to test it out?

-

Okay awesome thank you so much for taking out the time to answer all these questions. I seriously appreciate this, im hoping i can use this mod to great effect soon. Im having a lot of fun with weaponcore and modded weapons for it, and being able to actually aim will be amazing. Sorry if im asking any duplicate questions or not making sense, found a kitten in the middle of the street last night and have been losing sleep nursing it back to health.

Im gonna start trying to test all this out very soon, so i might have more questions coming.

Thanks again <3
Last edited by Sparktite; 6 Dec, 2021 @ 12:25am
cheerkin  [developer] 6 Dec, 2021 @ 1:01am 
> it be possible to use say a gimbal laser from the MA Weapons mod in place of the gatling turret?
Gimbal mount does not care about weapons. It just rotates itself so anything mounted would cross at certain single point. So yes, it is possible. All hinges would rotate towards a single point, and when target is acquired by turrets, that point (zero range) would be at the precise distance of the target.

> What is a rotor cannon?
I mean rotor displacement cannon, a spring of rotors that launches a block projectile. Or gravity cannon, gravity torpedo, etc, it does not matter. Like here: https://www.youtube.com/watch?v=cqfe14q1sTM

> Is it possible to set up the script or the ship in some way to allow for different weapon velocities? I wanna try mixing weapon system groups that i switch between when i wanna fire say a sniper at 400m/s vs a regular gatling gun.
That makes perfect sense, but I'm not planning to complicate script for the sake of being more mod-friendly - all my scripts are meant for vanilla. All I could do - that variable to adjust bullet speed. So it's either vanilla gatlings or modded ones.

> What does the min size parameter do or is that explained elsewhere?
See arg reference for details. It means minimal size of target that would be targeted. Less than that - ignored. I think it's 7m by default.

> If i have 6 frontal facing cameras, arent they all gonna have line of sight to enemies anywhere in front of me?
Generally yes, but in some cases - no. If you take a look at my ref ship, you can imagine situation when a rightmost camera LOS would be blocked by canopy if the target is 45 degrees to the left. In that case the script would raycast all cameras until success, so you need to have it covered. If your cameras are simply placed in forwardmost fashion with no obstructing blocks around, they would always have unblocked 45 degree cone, but with more complicated builds you need to pay attention.

> How do i enable the projector aiming mode to test it out?
Double tap C
Sparktite 6 Dec, 2021 @ 3:36am 
Okay cool this is all starting to make sense now, thanks so much.
I'm starting to tinker with the modded weapons now, and i can tell using weapon core alongside this isnt gonna work out ideally. However i can still manually fire using the lead indicator with weaponcore so all is not lost.
Ive attempted to remove half the gatlings and replace them with laser pulse weapons. However I'm getting an error when using gatling mode which says, "No weapons found for type Gatling" I tried adding one gatling gun back onto the coaxial group but I'm still getting the error.
If i dont touch the weapon groups i can however add on new weapon groups with the click to fire option enabled on them.
Is there a way to disable the error and use gatling mode without gatling guns attached?
cheerkin  [developer] 6 Dec, 2021 @ 4:28am 
Nope, you need at least one gatling gun because script bases its computations on position of actual weapon. Tracers are drawn like if they were fired from weapon's bore, not just randomly. Script knows nothing about non-vanilla gun types thus it does not have prediction and groups for mod weapons.
What is the 'correct' orientation of the gyro?
What does 'Coaxil-Weapons' group actually do? I added my ship's railgun (vanilla large ship railgun - though projectile is modded) and nothing appears to happen, the script cannot seem to recognize it (mechanically in game terms it is a missile launcher, that fires a missile with no acceleration)

Is there a specific name the group needs to have with the PB? Does it matter if they are on different subgrids with the weapons/remote control/cockpit etc?
cheerkin  [developer] 27 Feb, 2022 @ 1:45pm 
Correct means matching the grid orientation. Gyro forward = grid forward, gyro up = grid up.

I haven't updated it to support W2 weapons yet, the update caught me in the middle of big rework of the script. Missile launcher exposes specific interface which I use to detect it, and new weapons have different one.

Group name (for all stuff except weapons which is "coaxial-weapons") does not matter. Subgrids are supported.
SpookyKitty 18 Jan, 2023 @ 8:28pm 
Could I use this on a remote controlled ship, with a transparent lcd in front of a camera?
I tried, putting the Remote Control Block and camera into the group with the rest, but it wouldn't fire and nothing showed up on the LCD.
cheerkin  [developer] 20 Jan, 2023 @ 4:21am 
It should work - for the code there is no difference between cockpit and remote control. Try the demo ship blueprint. I don't remember if it has remote control added, if not - then add it to the group and use instead of the cockpit. Remember to recompile script after changes.
< >
Showing 1-9 of 9 comments
Per page: 1530 50