A thought: Dynamic crosshair

Want to edit the game, build your own craft and missions? Here you'll find help, tools, guides and people to discuss with.

Re: A thought: Dynamic crosshair

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Tue Apr 07, 2020 6:34 pm

keiranhalcyon7 wrote:
Tue Apr 07, 2020 6:14 pm
Would it be possible to implement it in the opposite way - that is, keep the crosshairs steady, and move the ship in the opposite direction (by adjusting both the camera origin and look-at point)?
Maybe, I don't know what variables the game's using for that, though.

On the other hand, here's my (simple) external reticle + Jeremy's HUD + Intertia. Both my reticle and the game's HUD are superimposed at the same spot (that feels nice):
ExternalHUD-Inertia.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
JeremyaFr
XWAU Member
Posts: 3975
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Tue Apr 07, 2020 6:38 pm

Nice :thumbs:

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14052
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Tue Apr 07, 2020 7:04 pm

Awesome! So, does it mean one could use different reticles for different craft? E.g. like the X-Wing has that classic reticle X-shaped reticle while a TIE Fighter has that circular like you see in the movies?
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Tue Apr 07, 2020 8:06 pm

General_Trageton wrote:
Tue Apr 07, 2020 7:04 pm
Awesome! So, does it mean one could use different reticles for different craft? E.g. like the X-Wing has that classic reticle X-shaped reticle while a TIE Fighter has that circular like you see in the movies?
I think this should be possible -- even if a bit tricky. I probably would have to co-opt DC to also replace .DAT images and side-load replacement textures from disk.

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Wed Apr 08, 2020 6:58 am

Alright, here's the new Cockpit Look hook (beta) with external view inertia:

EDIT: Link removed, see updated version below.

To enable cockpit inertia, add the following to cockpitlook.cfg:

cockpit_inertia_enabled = 1
cockpit_inertia = 0.35
cockpit_max_inertia = 0.2
cockpit_speed_inertia = 0.005

To enable external view inertia, add the following:

external_inertia_enabled = 1
external_inertia = 1.5
external_max_inertia = 0.03
external_tilt = -10.0

The external_tilt is measured in degrees and it's the tilt that is applied to the craft as soon as external view is enabled.

I haven't tested this at all with any tracker; but it works in the regular game mode (no tracking selected).
Last edited by blue_max on Thu Apr 09, 2020 7:59 pm, edited 1 time in total.

User avatar
JeremyaFr
XWAU Member
Posts: 3975
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Apr 08, 2020 1:54 pm

UPDATE

EDIT: link removed

Changelog:
- the exterior view is preserved when enter or exit hyperspace
- the HUD is not drawn is hyperspace
- you can use Control+End key to show/hide the HUD
Last edited by JeremyaFr on Wed Apr 08, 2020 6:55 pm, edited 1 time in total.

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Wed Apr 08, 2020 4:43 pm

JeremyaFr wrote:
Wed Apr 08, 2020 1:54 pm
- the HUD is not drawn is hyperspace
I don't think this was necessary, and I think it actually broke the HUD when entering hyperspace if we jump in cockpit view.

With the previous hook (or without it), the HUD is still rendered while in hyperspace if we jump in cockpit view. With this new hook, the HUD is removed completely even after exiting hyperspace. The only way to get it back is to go into external view and return to cockpit view.

Also: it looks like the individual HUD regions can no longer be hidden in exterior view. Not a big deal; but maybe something you might want to fix later.

Finally: is it possible to keep the craft in exterior view when jumping into hyperspace? If not, that's OK -- just wondering if that would be possible.

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14052
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Wed Apr 08, 2020 6:15 pm

OK tested it and it's glorious. I increased the max_inertia from 0.03 to 0.1 for a bigger effect.

One thing I noticed, you can no longer freely rotate around your ship when hitting * in external view. It will only let you rotate within the inertia boundaries.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
JeremyaFr
XWAU Member
Posts: 3975
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Wed Apr 08, 2020 6:57 pm

UPDATE

EDIT: link removed

I've reverted the change that hide the HUD in hyperspace.
Last edited by JeremyaFr on Fri Apr 10, 2020 7:16 pm, edited 1 time in total.

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Wed Apr 08, 2020 7:03 pm

General_Trageton wrote:
Wed Apr 08, 2020 6:15 pm
One thing I noticed, you can no longer freely rotate around your ship when hitting * in external view. It will only let you rotate within the inertia boundaries.
You mean that the arrow keys can no longer be used to look around after hitting * ? I'll fix this; but you can also use the mouse to look around in the meantime (just press Scroll Lock).

User avatar
DarHan
Rebel Alliance
Posts: 325
Joined: Mon Dec 05, 2005 12:01 am
Contact:

Post by DarHan » Wed Apr 08, 2020 7:18 pm

My feedback so far is a simple “wheeeeee!
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14052
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Wed Apr 08, 2020 7:50 pm

Ah I see, didn't know Roll_lock + mouse worked. I'm used to hit * on the numpad and then use Joystic as I got that already in hand.

Oh btw, just noticed, the HUD is now also drawn in the various hangar views, which is a little odd.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
Trevor
Lieutenant JG
Posts: 541
Joined: Thu Dec 04, 2014 7:11 pm

Post by Trevor » Wed Apr 08, 2020 11:20 pm

Wow, that looks awsome, just like Rogue Squadron

Can the reticule be split - as has been mentioned before, to give a concept of lead (like the RS crosshair in vid above - as the craft moves, the 2 crosshairs move to show the direction the lasers will go if not directly in front )

Trev

User avatar
Vince T
Fleet Admiral (Administrator)
Posts: 14052
Joined: Fri Apr 27, 2001 11:01 pm
Contact:

Post by Vince T » Wed Apr 08, 2020 11:32 pm

As awesome as that would be, I doubt it.
Your ship, Captain. I need a drink. - Vince Trageton
Vince T's X-Wing HQ - where the bad guys get their gear

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Apr 09, 2020 7:59 pm

General_Trageton wrote:
Wed Apr 08, 2020 6:15 pm
One thing I noticed, you can no longer freely rotate around your ship when hitting * in external view. It will only let you rotate within the inertia boundaries.
Here's the updated hook with the fix for this issue:

EDIT: Link removed, see updated hook below.

@Jeremy: Thanks! The HUD is OK now in cockpit view when jumping through hyperspace. Everything looks good to me now.
Last edited by blue_max on Fri Apr 10, 2020 7:29 pm, edited 1 time in total.

User avatar
DarHan
Rebel Alliance
Posts: 325
Joined: Mon Dec 05, 2005 12:01 am
Contact:

Post by DarHan » Thu Apr 09, 2020 8:54 pm

Quick question: would it be possible to have key shortcuts to quickly zoom in or out in external view? The normal procedure of enabling free rotation then holding down the targetting key/button isn’t exactly practical in some circumstances.
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Apr 09, 2020 9:23 pm

DarHan wrote:
Thu Apr 09, 2020 8:54 pm
Quick question: would it be possible to have key shortcuts to quickly zoom in or out in external view?
This might be possible, what do you have in mind?

User avatar
DarHan
Rebel Alliance
Posts: 325
Joined: Mon Dec 05, 2005 12:01 am
Contact:

Post by DarHan » Thu Apr 09, 2020 9:31 pm

I was thinking something with the + and - keys, possibly the ones on the num keypad, maybe with a modifier key.
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

User avatar
Driftwood
Admiral (Moderator)
Posts: 2174
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Fri Apr 10, 2020 2:14 pm

Bear in mind whatever keys are used they need to not interfere with other keybinds.

For example num enter we learned allows you to select a sub system in the repair menu to prioritize it to repair first. That function as far as I have found in the past isnt listed in any manuals or key charts.

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Apr 10, 2020 4:26 pm

Well, the good news is: yes, it's possible to add this zoom in/out function to the hook. The bad news is that +/- both in the numpad and the main keyboard change the throttle. Even if I add the [Ctrl] key (so that you have to press Ctrl+ and Ctrl-) the throttle is still affected. So, the difficult bit here will be to find suitable keys. Maybe numpad 7 and 9?

User avatar
DarHan
Rebel Alliance
Posts: 325
Joined: Mon Dec 05, 2005 12:01 am
Contact:

Post by DarHan » Fri Apr 10, 2020 5:41 pm

Numpad 7 and 9 are fine to me.
“Red Four, nothing’s gone wrong yet.”
— Hobbie Klivian

User avatar
Ace Antilles
Admiral (Moderator)
Posts: 7880
Joined: Sat Jan 22, 2000 12:01 am
Contact:

Post by Ace Antilles » Fri Apr 10, 2020 6:10 pm

blue_max wrote:
Tue Apr 07, 2020 6:34 pm
keiranhalcyon7 wrote:
Tue Apr 07, 2020 6:14 pm
Would it be possible to implement it in the opposite way - that is, keep the crosshairs steady, and move the ship in the opposite direction (by adjusting both the camera origin and look-at point)?
Maybe, I don't know what variables the game's using for that, though.

On the other hand, here's my (simple) external reticle + Jeremy's HUD + Intertia. Both my reticle and the game's HUD are superimposed at the same spot (that feels nice):

ExternalHUD-Inertia.jpg
That's great! I like the idea of that. It's how I've gotten used to flying in Battlefront 2 and I'm pretty good if I do say so myself ;)
Chief XWAU Team annoying nitpicker.
Ace Antilles - The X-Wing Outpost
Image

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Fri Apr 10, 2020 6:13 pm

Driftwood wrote:
Fri Apr 10, 2020 2:14 pm
For example num enter we learned allows you to select a sub system in the repair menu to prioritize it to repair first. That function as far as I have found in the past isnt listed in any manuals or key charts.
Holy crap! All these years of just resigning myself to "It'll get repaired when it gets repaired, because TG broke it, and if I die I'll just have to refly."

This could probably be fixed (i.e. replaced with normal enter, like wingman commands) with a patch, or a hook.

User avatar
JeremyaFr
XWAU Member
Posts: 3975
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Apr 10, 2020 7:17 pm

UPDATE

Hello,
I've uploaded the exterior hook to OneDrive and GitHub.

User avatar
blue_max
XWAU Member
Posts: 2296
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Apr 10, 2020 7:28 pm

DarHan wrote:
Fri Apr 10, 2020 5:41 pm
Numpad 7 and 9 are fine to me.
OK, here you go:

https://www.dropbox.com/s/5hjvgmyybtdaw ... k.dll?dl=0

Pressing NumPad 7,9 while in external view will change the zoom level (you need to have NumLock activated, though). These keys are unchanged in the regular cockpit view. If someone later finds out that these keys were already assigned to some other function and I broke it, I'll revert the change.

This hook also implements cockpit and craft inertia, these are the default settings I added to CockpitLook.cfg to enable these features:

cockpit_inertia_enabled = 1
cockpit_inertia = 0.35
cockpit_max_inertia = 0.2
cockpit_speed_inertia = 0.005

external_inertia_enabled = 1
external_inertia = 1.5
external_max_inertia = 0.03
external_tilt = -10.0

Post Reply