emoose / DQXIS-SDK

Wrapper DLL & SDK for Dragon Quest XI S

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Improved Blind/Low-Vision Accessibility Options

mike9k1 opened this issue · comments

I got an interesting request today, and thought it would be appropriate to share it here as it may be more within the realm of the SDK for potentially implementing some of this functionality.

image

We've exchanged notes back and forth a few times, they've since tried the demo with some degree of success (with most features in 3D mode accessible to some degree). Navigation so far seems to be the big hurdle.

I've come to the understanding that it might be possible to get coordinates for the character/camera position from the game, which might make this a little more possible. Most UE4 games will print this with the showdebug command, however that is not the case with DQXI (it darkens the screen to show a display, but nothing displays), so my guess is that might have been dummied out with the rest of the debug (menu) stuff.

There may very well be another way to display coordinates that i'm not thinking of.

Edit: I've found that showdebug (only) works with ToggleDebugCamera enabled. If we had a way of displaying these coordinates in regular gameplay (preferrably some way that could be easily read by OCR / JAWS / NVDA), this would be a big plus

I'd guess the player Actor/Character class probably has coordinates for it somewhere, if there's a way to find that for player char then maybe could do a setup where a thread is spawned that just constantly outputs the coords to a text file, or copies them to an easy-to-know memory address for an external app to read & handle.

STATIC_GetJackPlayerCharacter seems to return an AJackCharacter*, you can see that in use at https://github.com/emoose/DQXIS-SDK/blob/master/DQXI-SDK/FirstPerson.cpp#L23 too.
That requires a "class UObject* WorldContextObject" to work though, which basically means any UObject that was created by the world IIRC, in the link I just used a pawn that was passed to our hooked function, but you could probably just use something like

auto randomChara = UObject::FindObject<ACharacter>();
auto playerChara = STATIC_GetPlayerCharacter(randomChara, false);

Ordinarily you'd want to cache the FindObject result too since that's pretty expensive, but if this was inside another thread it probably wouldn't matter much, could be some thread-safety issues with it though - maybe could hook something player-movement related instead of using another thread, if the hook gets ran every frame.