2019-06-06 03:55:12

Hey everyone.

So, this idea might sound strange at first, but let me explain.

As some of you might know, me and some others are actively trying to get X3 albion prelude as accessible as possible.
Some things we already have achieved, but the largest point is still not figured out.
X3 is a very heavy menu based game which entirely can be controlled by the keyboard.
What we want to do is find a way to let the menu of the game talk, and here would be my idea, keep in mind that I am not a programmer and don't know if this would even work.
X3 has the ability to be modded which has been the way for us to play the game.
My idea now would be creating a mod for the game which takes the active menu options or string under the active cursor, copy it, put it somewhere and let another program read out the string with the Tolk library for NVDA.
Basically, options appear, x3 script finds active cursor, copies it, sends it over to other program, other program reads out copied string with the tolk library.
Maybe we could also integrate the tolk library directly into the x3 script that could copy the active string.
Someone managed this with a GTA trainer, so I guess it would be technically possible.

Any input from you guys?
We are missing a programmer for this project.
If someone would be able to help us, a monitary reward from my side would be definatly an option.

So, what are your thoughts?

Greetings Moritz.

Hail the unholy church of Satan, go share it's greatness.

2019-06-06 05:22:23

if there's a way to discover the string of the menu based on the cursor position, you probably don't need to copy it, you can just pass the string to the tolk_output function.
Just a curiousity in which language is the script made?

Paul

2019-06-06 06:30:26

Hi.

Hrm ok, we would need to find a way to discover the string though.

I believe that the scripting language is a proprietary language. Some of the scripts are XML files, but most of them are in the pck format.

Greetings Moritz.

Hail the unholy church of Satan, go share it's greatness.

2019-06-06 06:35:20

Hi All,

Okay, let me talk a bit about X3 scripting. smile

The language is proprietary, internally stored as XML, but script developers don't usually see that. .PCK, which Simba mentions, is just a compressed XML file.

The only way native scripts can contact the outside world is to write to numbered log files. Getting data IN is more complicated, but we aren't worried about that.

I need to find a way to get the current menu options and pass them to a speech program. I'm not sure how to analyze the memory structure, my experience is more with high-level languages then this kind of low-level reverse engineering. Still, I believe it should definitely be possible.

Basically I want to avoid reliance on NVDA's OCR feature, which is the current way we use the menus.

2019-06-06 09:50:46

a script could be created and it could act as a watcher. It would monitor the log file, and speak whatever data the log file has in it, provided that the data is the string.
For this to work though, I believe we must be sure that the data we receive is indeed the string that has to be spoken.

Paul

2019-06-06 10:12:36

Yeah, how does the log look like? I don't think it stores each option which is stored under the cursor

If you want to contact me, do not use the forum PM. I respond once a year or two, when I need to write a PM myself. I apologize for the inconvenience.
Telegram: Nuno69a
E-Mail: nuno69a (at) gmail (dot) com

2019-06-06 16:31:57

If this game is as script/mod-friendly as suggested, has anyone approached the developers about adding necessary functions to the scripting language?

2019-06-06 17:01:50

The log files can contain, theoretically, anything. I current use them to display in-game trade prices when the player docks at a station, and a few other scripts do things like display a "map," of the sector of space the player ship is in.

The problem is that, as far as I know, scripts don't have access to the context when you're in an in-game menu, though you can certainly create custom menus easily. I've approached the developers earlier about general accessibility asks, they're largely interested in working on the sequel to X3 at the moment, which is understandable.

2019-06-06 18:27:59 (edited by zkline 2019-06-06 18:29:37)

Just to clarify a bit, the "Log files," aren't written at all unless a script explicitly does so. The command would look something like "write to log file 150 value = "Good %d is trading at %d", $good, $price, null, null…"

Yes, the script syntax is *that* verbose and the nulls are required. Fortunately there is an external script editor which is very nice, as long as you're using Jaws. The game's built-in editor suffers from the same menu accessibility issues.

2019-06-09 09:23:33

Hmm, I don't know if that would even work.
Take active string, write active string to file, program read file and outputs it to tolk library. As i said, I am not a programmer, so i don't know if this would even have a chance of working.

Greetings Moritz.

Hail the unholy church of Satan, go share it's greatness.

2019-06-09 18:42:37

At the moment I'm at a bit of an impasse. The game text is stored in XML files, which is theoretically easy to read, but I'm not sure of how to get at the current menu selection. We can't do it from the internal scripting language, so the only other choices I can see are modifying the game's source code, or some kind of reverse engineering to figure out how the text is displayed and vocalizing that way.

I just thought of a third approach, we could write some kind of add-on for NVDA which would improve the OCR so it focuses on text of a specific highlight color. This is probably possible but I don't know how difficult it would be.