The Dynamic Cockpit Project

Need help editing the game? Check for help here!

Moderators: Darksaber, General_Trageton, Forceflow

Post Reply

Re: The Dynamic Cockpit Project

User avatar
Driftwood
Lieutenant Commander
XWAU Member
Posts: 1714
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Thu Sep 26, 2019 12:48 am

I was kinda thinking about this a bit more, and I was considering maybe it'd almost be better to put all (non text) elements of the hud in a visor shape like the helmet visor above in my other post, but translucent enough to be easy to see through and still simulate being projected on the visor. Maybe linking them in a way where it's a simple toggle on/off function that "raises" the visor simulating turning off all the projected hud elements, rather than having them all independently toggle-able. Or maybe there's a way to allow toggling on/off all of them independently, but still have a HUD visor background that would be toggled off when they are all shut down? Just a thought, I don't know how viable that would be.

User avatar
Driftwood
Lieutenant Commander
XWAU Member
Posts: 1714
Joined: Wed Oct 22, 2003 11:01 pm
Contact:

Post by Driftwood » Thu Sep 26, 2019 12:52 am

Turgidson wrote:
Wed Sep 25, 2019 10:19 pm
Thanks for the tip on how to enable/disable the HUD in addition to the dynamic cockpit. And BIG THANKS for all the impressive effort.

Regarding HUD redesign, I'd also agree the "real world" should be a source of inspiration. However, I don't think all the elements should be cluttered close to the screen center - thus obscuring the view where it matters most for dogfighting. For me, XWA's "HUD" seems closer to a Helmet-Mounted Display (and even more if using a VR helmet), so the "screens" can be scattered further apart from the reticle (as long as it remains readable enough).

Also, there's less information needed to fly a Star Wars starfighter than a real-life jet plane: we don't really need or even have altitude, boresight, flight path vector, angle of attack, heading, horizon... so it's a simpler HMD/HUD.

The following info is of course necessary:
- weapons, shields, engine (and beams) energy status (gauge or percentage)
- shields and hull status (could keep the current graphics, but having only the percentages would work too!)
- weapons recharge status (current graphics, or percentages! - or reticle symbol, for example have a brighter spot when it's double-charged)
- beams status (if applicable)
- countermeasures remaining
- speed
- throttle
- weapons sight / reticle
- forward and rear "radar"
- textual information about the targeted craft: type, name, distance, hull %, shield %, systems %, targeted component. No need to show a picture of the target itself (which would clutter the HMD view), this should be kept on the Dynamic Cockpit's targeting computer.
I think the HUD graphics would probably work centralized in some fashion, but would need to be "skeletonized" (no HUD dat backgrounds) to include only the relevant numerical graphics, and the charge indicators, provided it was spaced out in a sensible manner. They probably could be spread out further than I have them mocked up currently, finding the "sweet spot" for easy readability, and not crowding out the reticle, would of course take some testing.

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 10321
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Thu Sep 26, 2019 2:30 pm

@Blue_Max While testing the (Bloom) Native Reshade, I decided to go the whole hog and test the Dynamic Cockpit, even though I don't have all this VR stuff, theoretically it should still work if the right settings are disabled/enabled correct?

So everything that was in the xwa_vr_ddraw_d3d11_v1.0.6 folder I copied all the relevant files and files to my XWA folder

Took a look at the Cfg files, most of the stuff is enabled to begin with;-

bloom.cfg
bloom_enabled = 1
for this test, the various other settings left as is

cockpitlook.cfg
left as is, but there does seem to be a problem with it, by default the mouse look is set to
tracker_type = None

I assume this has to be changed to what ever tracker you have (FreePIE, SteamVR or TrackIR) but as it's set to None (for people who just want to use the regular mouse look mode)
That's all well and good, in the hangar you can look around using your mouse as usual

The problem is though when you launch you have to use the keypad keys to look around, but these are Disabled, so you have no way to move your view, making the use of the Dynamic Cockpit pointless as you can't see most of the screens

I would have thought that setting the tracker_type to None would have disabled all the functionality of the Hook_XWACockpitLook.dll but it doesn't. It's only functionality seems for use with the VR equipment so the head tracker works correctly, not sure

In the readme it does say
Version 0.9.5. July 15, 2019.
Added offsets to yaw and pitch. The FreePIE slot can now be selected. The hook
can now be disabled without uninstalling the hook by selecting "None" as the
tracker.
It says the Hook can be disabled by setting to None, but this isn't true, to use my keypad keys again I had to disable the Hook completely

DDraw.cfg
Nothing changed

dynamic_cockpit.cfg
dynamic_cockpit_enabled = 1

hook_textures_tag.cfg
Not touched

vrparams.cfg
Not touched

I know the Dynamic Cockpit is basically for use for people with VR equipment, but I just wanted to test to see what it looked like for a none VR user, what I could see looked promising but for the standard user it's not ideal at the moment, to see everything you have to mess about with the keypad keys (when I eventually got them working), which is not ideal game play, the original HUD layout is much better. Please don't get me wrong, it's a great project for someone that owns VR equipment, but I'm afraid it's not for me.

I will eventually add to the the craft packs but it will have to include 2 or 3 options
I). To just install the Bloom stuff
2). To install the Dynamic Cockpits files, but leave out the Hook_XWACockpitLook.dll (unless it's fixed) for people with NO VR equipment
3). Install the Dynamic Cockpit files for people with VR equipment, but they will have to manually configure the files as there are too many variable setting
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 10321
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Thu Sep 26, 2019 2:52 pm

Quick Question, what the format to change the background color?

I wanted to change the background color to black so tried this with the y-wing
; Y-Wing
; Targeting Computer
[YwingCockpit.opt,TEX00069]
cover_texture = DynamicCockpit\x-wing-targeting-comp-cover.png
cover_texture_size = 256,128
; In the Y-Wing the targeting box is mirrored in both axes, so we invert
; the coordinates here as well to compensate (x1,y1) comes before (x0,y0)
uv_coords = TARGETING_COMPUTER_SRC, 242,115, 13,12 0XFF0000
; Also erases the laser/ion charge levels:
erase_region = TARGET_AND_LASERS_REGION
It didn't work though :(
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Sep 26, 2019 5:32 pm

@Driftwood: I would be lying if I said that I followed everything you put there. I think what I can do is enable HUD background toggling (per region) and also enable coloring/transparency for the HUD foreground to at least continue the discussion.

@Darksaber: Thanks for your input. Setting Tracker_Type to None should disable the hook without uninstalling it and the mouse look should work fine. I know because I use it like that all the time and I can look around the cockpit without trouble. The keypad keys being disabled means that the hook is still trying to track a nonexistent input. So, obviously, I've got a bug in there somewhere. I'll fix it.

Background color: I believe you might be missing a comma and it should be a 0. So, try "uv_coords = TARGETING_COMPUTER_SRC, 242,115, 13,12, 0X0". The left/right sensors usually have a black background color so you can use those as reference. I think I need to add some sort of error logging mechanism to catch these things.

I've actually played the first battle mission using DC only without VR. I did have to adjust the view at the beginning (looking down a little bit so that the targeting computer was visible). I wasn't able to read much and I basically ignored the left/right sensors; but I could complete the mission. I agree, however, that a proper solution (for everyone) would require some rework in the cockpit so that the instruments are readable without VR though. But again, I understand that some people may not like DC at all, so I've put options to disable it, to enable DC and the regular HUD, or just have DC.

Time to fix some bugs in the hook!

JeremyaFr
Lieutenant Commander
XWAU Member
Posts: 1611
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Thu Sep 26, 2019 6:01 pm

Hello,
The code that reads the "uv_coords" setting is defined here:

Code: Select all

res = sscanf_s(substr, "%f, %f, %f, %f; 0x%x", &x0, &y0, &x1, &y1, &uColor);
There is a semicolon and the color starts with "0x".

User avatar
keiranhalcyon7
Ensign
Posts: 276
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Thu Sep 26, 2019 7:21 pm

Darksaber, unless cockpit look disabled it as well, you should be able to enable mouselook in flight by pressing scroll lock. (Note, though: the game doesn't read the state of the scroll lock value; it tracks it internally, and resets it with each launch. Jeremy, do you know any offset that could override this and enable mouselook always?)
Last edited by keiranhalcyon7 on Thu Sep 26, 2019 9:33 pm, edited 1 time in total.

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 10321
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Thu Sep 26, 2019 7:37 pm

Yep got it now

Code: Select all

uv_coords = TARGETING_COMPUTER_SRC, 242,115, 13,12[color=#FF8000]; 0x0[/color]
it looks so much better in black

Please don't get me wrong, I'm not saying I don't like it, I'm just saying I would personally prefer to use the older Hud, it's a great idea, but it caters for those with VR :D

Also I don't really want to restart reworking the cockpits myself, DTM has already reworked the Y-Wing which is fine, he's quiet welcome to change any of the other cockpit if he wishes, personally I just haven't got the will to restart making them over and over, sorry

I hope you find the bug

Oh while I'm at it could there be a few name changes to the file names please

This might be a little OCD and it bugs me a little, again sorry

Is it possible to change

Hook_XWACockpitLook.dll to Hook_Cockpit_Look.dll
cockpitlook.cfg to Hook_Cockpit_Look.cfg
bloom.cfg to Dynamic_Bloom.cfg to match Dynamic_Cockpit.cfg since they belong to the same thing

the other stuff just capitalize it like so
openvr_api.dll to OpenVR_API.dll
dynamic_cockpit_internal_areas.cfg to Dynamic_Cockpit_Internal_Areas.cfg
vrparams.cfg to VRParams.cfg
vrparams.cfg.vr to VRParams.cfg.vr (is this file needed????)

the texture.png files are ok as they are though :D, I know this is over the top a little, I just like to see the file capitalized, it's one reason why after the DSUCP or XWAUCP is installed you'll notice all or most file names have been made lowercase and capitalised

@keiranhalcyon7 Just tried scroll lock and number lock just in case, still no difference, I can't look around, yet Num keys 1 and 3 work you can still spin
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Thu Sep 26, 2019 9:51 pm

No worries, Darksaber. I can do the name changes, the only one that probably doesn't make sense is changing "bloom.cfg" to "Dynamic_Bloom.cfg" because you can have bloom without DC. Otherwise I don't see any problem with renaming things. VRParams.cfg.vr is a sample for guys who want to use VR so they would replace VRParams.cfg with that one.

Oh, and thanks guys for pointing out the semi-colon problem -- even I forgot about that detail!

User avatar
keiranhalcyon7
Ensign
Posts: 276
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Thu Sep 26, 2019 9:58 pm

Darksaber wrote:
Thu Sep 26, 2019 7:37 pm
bloom.cfg to Dynamic_Bloom.cfg to match Dynamic_Cockpit.cfg since they belong to the same thing
They really don't, though. Yes, they're implemented in the same ddraw.dll by blue_max, but the "dynamic" term only applies to the dynamic cockpit, specifically referring to making the cockpit textures dynamic. Using the term "reshade" would also be inappropriate, since ReShade is it's own project; what it really is is a quasi-HDR post-processing step. That's ridiculously verbose, though, so my suggestion would be to move the bloom controls to a [bloom] section of ddraw.ini.

(Edit: semi-ninja'd)

User avatar
keiranhalcyon7
Ensign
Posts: 276
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Thu Sep 26, 2019 10:03 pm

blue_max wrote:
Thu Sep 26, 2019 9:51 pm
VRParams.cfg.vr is a sample for guys who want to use VR so they would replace VRParams.cfg with that one.
Maybe move the content of VRParams.cfg.vr to a commented-out section of VRParams.cfg (with a usage comment)?

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 10321
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Thu Sep 26, 2019 10:03 pm

Lol your getting confused now, don't you mean DDraw.cfg not ini and I agree it could be added to DDraw.cfg
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

User avatar
keiranhalcyon7
Ensign
Posts: 276
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Thu Sep 26, 2019 10:35 pm

Sorry; I'm on mobile at the moment. Yes, that file.

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Sep 27, 2019 4:48 am

Hey Darksaber, I checked the functionality of the cockpit look hook and yes, the numpad keys are completely broken. I'll fix that. However, there's one detail I'm missing: can you look around with the mouse while you're flying (after pressing scroll-lock or whatever key that was)? That seems to be working fine here when setting tracker_type = None.

EDIT: Please try the following version, the numpad keys and the mouse look should work:

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

If this version still doesn't work then could you please send me the file cockpitlook.log? The hook will dump some debug information that can help me continue the investigation. Thanks!

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 10321
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Fri Sep 27, 2019 5:55 am

Yep you've fixed it with the numpad keys and yes the scroll lock and mouse works too

the scroll lock and mouse look worked in the old version, just not the keys

Thanks
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Fri Sep 27, 2019 6:13 am

Thanks for confirming that the hook works, Darksaber! BTW, the bug was -- essentially -- me being a moron: I forgot to copy-paste the code that read the numpad keys, and because my laptop doesn't have those keys I never noticed it. Thanks for bringing this bug to my attention. I'll make a formal release with the fix and I'll apply the name changes to the files you've suggested as well.

Oh, and yes: the bloom parameters can be moved inside DDraw.cfg too, that shouldn't be a problem. Do you guys think that would be more convenient than having a separate bloom config file?

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 10321
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Fri Sep 27, 2019 6:40 am

First thanks for the fix :)

Hmmm... keiranhalcyon7 does have a point that it's more to do with DDraw, but if people are more likely to look at the Bloom.cfg instead of the text being at the bottom of the DDraw.cfg

To be honest I shouldn't have mentioned it, please keep it at Bloom.cfg, at least then we all know what it is :)
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

blue_max
Ensign
XWAU Member
Posts: 332
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sun Sep 29, 2019 5:25 am

I've posted an update in the Hook Editing subforum in the Head Tracking thread with a new release of the CockpitLook hook. I've changed the names as per your suggestions, Darksaber and re-enabled the keypad keys as well.

User avatar
Darksaber

Fleet Admiral (Administrator)
Posts: 10321
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sun Sep 29, 2019 9:25 am

Thanks again :)
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Post Reply