Couple of Questions

Everything about Modding the game, from new courts to the modifications of the player & tournament bases (and including all the bugs they may be creating ! ;) )

Couple of Questions

Postby JLove » 26 Jan 2023, 23:44

Is there a posting somewhere that actually explains how modding works, what can and cannot be modded, how much we can change things like menus, whether we can affect or change actual game mechanics or behaviors, what language mods are coded in, that sort of thing? I'm very interested to see exactly what can and cannot be modded. I'd like to attempt to at the very least mod TE4 and TEM2 to have spoken menus for those of us using a screen reader, assuming that adjusting menus is possible. TE4 wouldn't be that playable for us with just spoken menus because actual on-court play during matches would need some serious accessibility love. Eventually it could be done, assuming that sounds can be modded and added to, but that would be a much more long-term project. However, after watching some play of TEM2 on Youtube, it seems that most of that game is actually played through menus. Given how much is actually done via menus, and given how strategy-based the game is, spoken menus would absolutely make that game decently, if not completely, playable for those of us who are blind.
Making games accessible to those of us who cannot see is a passion of mine. My largest success to date is with Supergiant Games' title Hades; I helped to develop the mods that have made that game 100% playable for us. I've been a huge tennis fan for about 27 years now, so I'd absolutely love to see some accessibility for the blind in a game like this.
Here's hoping Paul can actually push Djokovic tonight in the AO semifinal. I am pretty sure Novak wins that, but hopefully Paul at least acquits himself well and makes it a competitive match.
JLove
tennis fan
tennis fan
 
Messages: 10
Gaming Since: 26 Jan 2023, 23:05

Re: Couple of Questions

Postby manutoo » 27 Jan 2023, 06:52

Hello,

here you'll find the starting point : topic60-33540.php ; it leads to many different moddable parts. Just get the Modding SDK to check the menus.

I'm not sure what kind of sounds you'd like to add during a match, but it likely won't be possible. :fear:
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18870
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Couple of Questions

Postby JLove » 28 Jan 2023, 02:33

For clarification, I am not looking to add sounds to matches. I am wanting to modify the menus so that when an item is highlighted in the menu, it is then spoken either by the TTS (text to speech) in Windows, or by a screen reader. This way a person who is blind will be able to know what they are selecting. This would make TEM2 very playable for us, as most things are done within menus.
So, to explain what I mean. When TEM2 loads, the main menu appears. There are options for "world tour", "training club", "recordings", "settings", etc. The first item that has focus is "world tour". When you press the right arrow, it moves to "training club". When this happens, "training club" should be spoken either by TTS in Windows, or by the screen reader that is currently running at the time. If you press left arrow, the person should hear "world tour" spoken. If I press enter on "world Tour", the first option that is focused, "Resume game", should be spoken. If I press right arrow, then "start a new game" would be spoken.
In other words, whenever a menu item is focused or highlighted, that menu item should be spoken by Windows TTS or by the currently running screen reader. This should apply to ALL menus.
I tried to give some links to materials regarding TTS and screen readers, but the forum won't let me post links apparently.
JLove
tennis fan
tennis fan
 
Messages: 10
Gaming Since: 26 Jan 2023, 23:05

Re: Couple of Questions

Postby manutoo » 29 Jan 2023, 09:00

Hum, I think you'll have a hard time doing that without long & tedious work (ie: need to add some action for every item on every menu).

How exactly do you send the text to the screen reader..?
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18870
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Couple of Questions

Postby JLove » 29 Jan 2023, 22:56

Since I cannot post links in this forum for some strange reason, I've put some links into a text file for you. The very general, broad way to send text to a screen reader is to make sure that your UI element (in this case menu buttons) is labeled with a name field, then to call the speech API to speak that name text when the button is selected. Making sure that UI elements (buttons, checkboxes, links, etc) are labeled correctly is the most fundamental thing with respect to accessibility. The links I've provided here allow for you to use the built-in text-to-speech functionality in Windows. If you go the RT Voice route, and if the demo won't work, then contact me privately and I'll cover the cost for you.
You do not have the required permissions to view the files attached to this post.
JLove
tennis fan
tennis fan
 
Messages: 10
Gaming Since: 26 Jan 2023, 23:05

Re: Couple of Questions

Postby manutoo » 30 Jan 2023, 09:35

0) You need 5 posts before being able to post links

1) Unfortunately, I really don't have the time to look into that, but from your explanation, it seems that you'd need me to add stuff in the game engine for this to work, because just modifying the menu scripts on your end won't do much :fear:
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18870
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Couple of Questions

Postby JLove » 31 Jan 2023, 02:12

That depends on exactly what I can do with the scripts. If the scripts allow me to actually change the format and layout of the menus, then there are some possibilities. If the scripts can access things in Windows, then that presents possibilities as well. I might be able to modify the menus in such a way that it makes using OCR (optical character recognition) a lot easier than it is now. OCR reads some things, but there's quite a bit that it doesn't read well. Some of that might be able to be helped with formatting modifications.
This sort of situation is why I really, really wish that accessibility design and implementation were part of any software development or computer science education. It saddens and amazes me how many software developers who've been coding for decades don't even know what a screen reader is. Teaching students about accessibility would allow developers to start making it a part of their projects from the very beginning, making it much easier to implement. It's much easier to add accessibility when you do it from the ground up rather than try to add it to existing code.
All of that being said, in this particular case, because of how much TEM2 relies on menus, the very best solution is to have the menus and other game text spoken. If that can only be accomplished in the engine itself, and if your only reason for not wanting to make the improvements is that you are too busy and don't have time, then if you give me access to the source code for game menus and for the other game text, I'll do all the work adding the accessibility code and testing, absolutely free of charge. Any modifications I make will be yours free and clear. I don't want any money or any credit. I just want those of us who are blind to be able to play your game.
JLove
tennis fan
tennis fan
 
Messages: 10
Gaming Since: 26 Jan 2023, 23:05

Re: Couple of Questions

Postby manutoo » 31 Jan 2023, 07:16

You can change the menus in any you want, but it can be a long process.

But you don't have access to any Windows API. You can relatively easily launch a program, though.

The game is a whole, there's no separate engine code for the menus, and I won't give to anyone the whole source code... :blackeye:
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18870
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Couple of Questions

Postby JLove » 01 Feb 2023, 00:22

Menus appear to have two types of files, .def and .menu. The .def files appear to be about creating a sort of visual template, and the .menu files seem to be where actual items are added to that template. Is this correct, or am I misunderstanding something? What language are the scripts coded in, in case I need to find a syntax reference somewhere? I've noticed two things throughout several of these files. OnAction, and OnEnter. Is OnEnter when a menu item is selected or highlighted, and OnAction when it's actually clicked or chosen? If not, then is there a way to determine when an item is highlighted as someone scrolls through the menu?
JLove
tennis fan
tennis fan
 
Messages: 10
Gaming Since: 26 Jan 2023, 23:05

Re: Couple of Questions

Postby manutoo » 01 Feb 2023, 09:23

.menu files are loaded by the engine and are referencable by their name with the Menu & SubMenu commands.
.def files are just files that can be included from other files.

Usually, .def files are used to define stuff that is shared amongst several .menu files (eg: fonts, size of stuff)

I created the menu script language, so it doesn't particularly follow any language. It's really just a script that is interpreted by the engine to create menus. You'll find a Menu.doc file in the folder to give you a few basic explanations (it may only be in the TE4 Modding SDK).

OnAction is activated when you click on an item.

OnEnter means the OnAction should be activated when the user enters the menu (ie: it's not about selecting the item).

AFAIR, there's no event nor any way to know if an item is selected. The only close mechanism is the tooltip system, but it might be quite inconvenient for your goal.

I guess I could add something for you, but I'm not sure what you need exactly so it's hard to design it in my head right now. The sure thing is that it should be something that doesn't require you to write something for each item.

If you can manage to send some text to your text reader from the game menus, let me know exactly how you'd have done it, and then I'll see how to automatize the process.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18870
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Couple of Questions

Postby JLove » 01 Feb 2023, 23:41

I need to be able to use an external library since I don't have access to the Windows UIA API. Even if I did, the UIA API won't work in this case, because the Unity engine outputs a single block of pixels, rather than the system UI elements that the screen readers rely on being able to see (like buttons, checkboxes, etc). I need to know when a specific menu item UI element is focused, so that I can then pass the name, or label, of that element (which should be the name of the item, i.e., "World Tour", "Training Club", etc) to the reader. The library allows for passing of customized text to a screen reader. Here's the library I have in mind since the accessibility API won't work in this case:
https://github.com/dkager/tolk
JLove
tennis fan
tennis fan
 
Messages: 10
Gaming Since: 26 Jan 2023, 23:05

Re: Couple of Questions

Postby manutoo » 02 Feb 2023, 10:04

Ok, try to add this to "Menu\Scripts\TrainingClub.menu", under the 2nd "OnEnter" (the one just before "Function FuncDefaultTc 1") :
Code: Select all
   OnAction
   {
      SysOpen "C:\PathToYourStuff\YourProgam.exe" "Hello"
   }


And tell me if you can hear "hello" when entering the Training Club menu.
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18870
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Couple of Questions

Postby JLove » 03 Feb 2023, 05:22

Okay. I modified the training club .menu file. I want to make sure I put the call to SysOpen in the right place. Let me know if this is right:

item
{
OnEnter
OnAction
{
SysOpen "C:\Users\jlove\Downloads\voice.exe" "Hello"
Function FuncDefaultTc 1
Function FuncDefaultTc 2
Function FuncDefaultTc 3
Function FuncDefaultTc 4

#if {Intern.TE4}
Function FuncSetStadiumName /TrainingClub/Stadium
#endif
}
...
I put the .menu file in the following directory:
c:\Users\JLove\Appdata\LocalLow\Mana Games\Tennis Elbow Manager 2\Mods\TestMod\TrainingClub.menu
It is the only file in that directory so far. And it did not work. I did not hear anything when entering that menu. Just as a test, I ran "voice.exe" from the Windows command line and passed "hello" into it, and it did work fine that way. So this leads me to think that either I have called SysOpen incorrectly, it is in the wrong location in the code and isn't being called, or it's being called, but it isn't actually running the executable.
JLove
tennis fan
tennis fan
 
Messages: 10
Gaming Since: 26 Jan 2023, 23:05

Re: Couple of Questions

Postby manutoo » 08 Feb 2023, 12:40

Sorry for the delay to answer you ; I wanted to update TEM2 before answering you because indeed the SysOpen wasn't working correctly as the argument is ignored.

So with today's update, you should be able to make it work like this :
Code: Select all
SysOpen "(@C:\Users\jlove\Downloads\voice.exe)" (@Hello)

(the quotes are needed only if the path contains spaces)
ManuTOO
== Mana Games ==

>> I don't answer Private Message, except if it's really a _Private_ topic <<
User avatar
manutoo
Game Author
 
Messages: 18870
Gaming Since: 24 Jan 2004, 15:38
Location: France

Re: Couple of Questions

Postby JLove » 17 Feb 2023, 08:03

Okay, tried again. Still not saying anything. This is how I have the code now. This is in the TrainingClub.menu file. I have it in mods\TestMod\. Code is:
Code: Select all
item
{
   OnEnter
   OnAction
   {
      SysOpen (@C:\Users\jlove\Downloads\voice.exe) (@Hello)
      Function FuncDefaultTc 1
      Function FuncDefaultTc 2
      Function FuncDefaultTc 3
      Function FuncDefaultTc 4

#if {Intern.TE4}
      Function FuncSetStadiumName /TrainingClub/Stadium
#endif
   }


Is this correct? I'm not hearing anything when I either select, or enter, the "Training Club" option of the menu. I tried removing the argument "hello" as well, which should just run the voice.exe program without argument. I have voice.exe set to speak a specific test word in that case. Still I heard nothing. So again, either I have placed sysOpen in the wrong place, I have called it incorrectly, or it is still not being executed.
JLove
tennis fan
tennis fan
 
Messages: 10
Gaming Since: 26 Jan 2023, 23:05

Next

Return to Modding - TE4

Who is online

Users browsing this forum: ClaudeBot and 1 guest