audio-only civ4?

undead

Chieftain
Joined
Dec 7, 2012
Messages
52
Hello all,

I have been thinking about turning civ4 into a completely accessible audio game. The speech would be done by a screen reader like NVDA controlled from Python or C++.

I'm not enough familiar with the API, so could someone tell me if it would be possible and if Python would be enough?

Some significant modifications would be, for example:
- a "map" mode to explore the known map, getting the contents of every tile
- a "city" mode to examine and change which tile will be worked

I think a potential tester has the vanilla version. Would the API for BTS or Warlords provide significant additional features for this mod?

Thanks.
 
...er...so instead of looking at the map, you'd have the option to let the game read the whole map to you?

mmhh...I think it's in general doable (but then again I have no idea what external libraries/speech processing modules are available), but I don't think you could find a really playable solution.
 
If civ4 allows using external modules from C++ or Python, then speech won't be a problem.

...er...so instead of looking at the map, you'd have the option to let the game read the whole map to you?

To be usable, in "map" mode, it would at least allow the player to use the arrow keys to move a cursor on the map. The content of the selected tile would be spoken. Eventually, additional keys would give different informations about the same tile.
 
Sounds like a damn lengthy project, which will require lots and lots of work.
And the target group is damn small.

If civ4 allows using external modules from C++ or Python, then speech won't be a problem.

You can use external Python modules (you can in general load more stuff into it, but you have to do it as a normale module, you cannot load other globally installed libraries), but you have to consider that the Python version in Civ4 is 2.4.something, so rather old.
 
For speech I would import the ctypes library and use ctypes to access a convenient C DLL. If Python's version is 2.4, then ctypes isn't included. Is it a problem?
 
Thanks for the reply. I have added in CustomAssets/python a customized CvEventManager.py with a popup similar to Baldyr's tutorial. The popup appeared when a game started.

Then I added "import ctypes" at the beginning of the file. I had copied the ctypes directory and a _ctypes.pyd file from my other python24 install to the CustomAssets/python directory. This time nothing happened and the error log contained an ImportError about "ctypes not found". (Some directories mentioned in the log are from "c:\python24". Strange, but that's probably another story.) Is ctypes in the right folder? Is ctypes being a partly binary module (with pyd files) a problem?
 
I'm not totally sure about this, since I've never attempted it. That it is a binary, shouldn't be a problem IMHO.
But that c:\python24 is referenced is bad, because that is the default Python installation path.

Honestly...no idea :dunno:. Would have to try it myself, but I don't think I'll find time for it, sorry :/.
 
Don't worry, you already helped me a lot. Since it's a Python problem, I might have the expertise to solve it. I'll probably investigate this path anomaly. Thanks again.
 
Back
Top Bottom