GenuineCorruption Posted August 5, 2012 Posted August 5, 2012 Hello. I understand that at first glance this thread may not seem serious, though please hear me out. My name is Jordan, and in spite of complete blindness from birth I've been playing Pokemon since generation four. The wall bumping sounds, grid-based navigation system and unique cries for every pokemon make it a popular choice for us visually impaired as it is a complex series of games which is reasonably easy to play. To read text on my computer, I use a program called Jaws (job access with speech) for windows. It recognizes printed text and converts it to voice using text to speech technology. In D/P/PT / B / W I used pokesav to perform such tasks as viewing locations of items in my bag, discovering the levels of my pokemon and insuring that my pokemon hold the correct items. I have started experimenting with PokeGen so I'll be able to play Black and White 2 which Pokesav won't support. I am pleased to say that for the most part, PokeGen works well for me. I can open a .pkm file and edit it's data no problem. I can access the tools > items menu and edit my bag no problem. Pokegen's one and only real accessibility problem shows itself when I attempt to populate the tabs with data regarding my party pokemon. Jaws cannot detect anything regarding party slots and loading pokemon from said slots. I can assume that the control which performs this function is purely graphical, which would explain why Jaws can't see it as it cannot recognize immages where no standard text is available. If you need more information, I can provide a detailed list of everything Jaws is able to detect within PokeGen. Can you please explain how this task is intended to be performed so I can do some more research? I will also be attempting to populate the tabs with information about box pokemon, though I believe this presents challenges as well. If a simple menu, button or dropdown box was available to perform this task, PokeGen would be entirely accessible to the visually impaired as editing PKM files, items and pokedex is accessible. As Action Replay is difficult to use, I prefer to use NDS adapter plus to transfer my saves to my PC, edit them and then use the adapter to transfer them back to the cart. Any advice would be greatly appreciated. I will definitely be providing as large a donation as I can afford if these issues can be resolved. Thanks, Jordan.
TheOnlyPKMNmaster Posted August 5, 2012 Posted August 5, 2012 Hey Jorden, thanks for getting the word out. Hopefully we'll get to access our boxes and party pokémon soon!
Codr Posted August 5, 2012 Posted August 5, 2012 I find it amazing that you manage to do these things and have the patience to do them with no vision. You're correct in that the party/box data is accessed visually. The main dialog of the program currently has icons representing the 6 Pokemon in your party, a combobox below that which allows you to select the box number, and 30 icons below that representing the selected box. The icons are what're referred to by Microsoft as static controls. They're coded to react to a right click from your mouse to bring up a menu that allows you to click "View data" and "Set". If that's not enough information, I can try to provide more, although I'm not sure what I've left out. Edit: I downloaded a demo of the program you use out of curiosity. I can see what you mean now. I'm not sure if there are options in the program (the demo is limited) that you might be able to change to make it tell you what's under your mouse pointer or something, but if you're solely using keyboard navigation, I don't see any options currently for you to work with.
GenuineCorruption Posted August 5, 2012 Author Posted August 5, 2012 Hello Codr, and thank you so much for the prompt reply. It's nice to see you are receptive to this, there are far too many software devs out there who have no interest at all in this kind of thing. You are correct in that the demo of Jaws is limited to 40 minute sessions, at which time you must restart your pc to continue for another 40 minutes. You can download a free alternitive, NVDA (non visual desktop access) if you are interested in researching accessibility. To me, there are a large number of possible solutions. As a person with some experience in software development myself I believe I have a pretty good idea of which ones would be easier and which ones would be more difficult to implement. The first, and most favorable option would be a dropdown box. I can easily access the dropdown box which displays boxes 1 through 24, the number of pokemon in the box and how many are selected. If you added a "party" option to that box, and then included an additional dropdown box which simply listed Pokemon 1, pokemon 2, pokemon 3 etc, this would allow for perfect accessibility. Jaws, and most if not all other screen readers, provide keyboard functions which simulate mouse clicks, you do not have to change the interaction method. For example, my first trip to the items window confused me for a moment. I selected an option (for example, potion 15) and pressed enter on it (often substitutes a mouse click in list boxes and combo boxes). That didn't work, so I then simulated a click on the item name which allowed me to edit it. Simulating a click on the count allowed me to edit the count as well. This is not really an issue as we're used to this practice. I attempted to simulate a click on the options to display party pokemon, however Jaws has no idea of their even existance due to their nature. One other thing I haven't tried is to simulate clicks on every spot which Jaws reports as being a blank space or a numbered graphic as it's possible for this to give results. I can understand that this method of implementing accessibility could be difficult as it would involve changing the interface, however there are other viable alternitives. Another option might be an addition to the file or tools menu, possibly called "load pokemon from save file" or a similar name. This option could bring up a simple dialogue with four controls: a combo box with options Party, and boxes 1 through 24, a subsequent box listing slots 1 through 6 if party is selected or 1 through 30 if a box has been selected, an okay and a cancel button. I would think that this would be an easier option to implement as it doesn't require modifications to the main interface, and to most end users it is tucked away where it won't bug anyone. A third possibility is keyboard shortcuts. For example, holding alt and pressing 1 through 6 might populate data from party slots 1 through 6 respectively, while perhaps control 1 through 0 (where 0 is 10) populates data from slots 1 through 10 in the currently selected box, control alt 1 through 0 might populate slots 11 through 20 and insert 1 through 0 might populate 20 through 30 respectively. I would suspect this to be the most difficult method. Again, I've coded before (in fact I am on my way to college for software development), and I know that creating a lot of keyboard commands is time consuming. My educated guess would be that options 1 or 2 would be easiest to implement (with a preference towards 2 as it requires no changes to the main window), if you are willing to do so. I can say for sure that though the blind trainer population is a small group, TheOnlyPKMnmaster and I are not the only ones, in fact I know two others personally and several others through the internet. A skilled visually impaired player has no disadvantage against a normal seeing person in a competitive battle (though as I've only been playing since gen 4 I haven't learned to recognize all cries and moves as some of my friends have). On behalf of blind trainers the world over, could you please work with us to solve this problem? Please ask if you require any further information. I would be happy to test anything you may come up with. As this software is a lifeline for us I am offerring a $50 donation as a token of my appreciation for your cooperation. Thanks again, Jordan.
Codr Posted August 5, 2012 Posted August 5, 2012 My initial thought was to see if I can change the static icon controls to instead be custom-drawn buttons that're able to receive focus. That's how the program identifies controls. I could probably assign window text to them as well that it would read to you, but wouldn't actually be displayed anywhere. If possible, these changes would result in no visible difference to everyone else while allowing you to use them.
GenuineCorruption Posted August 5, 2012 Author Posted August 5, 2012 Hello. Yes, screen readers do prefer it when an object can receive focus. I`m not sure if Jaws would be able to recognize invisible window text or not, but it is worth a try. Many years ago I wrote a small program with 4 buttons and showed it to a visual friend. I told him to click one of the four buttons and he told me there was only one. I was confused because I knew I could use tab to navigate from button to button, and there were definitely four of them, each with its own working function. He looked at my source code and told me that my controls were stacked like plates, and so only the final control was visible. The code behind them was correct, but there position made three of the four invisible and Jaws could see and use them. Invisible window text may or may not be recognized, I can't say for sure. It'd be perfect if it works. I tried simulated right-clicks on every possible location where Jaws would let me place my mouse pointer in the PokeGen window, however none of them produced context menus. Jaws is skipping over them. If you can make something work you'll save me hundreds of dollars, because my only other option if I ever want to be successful in B2W2 would be to design my own accessible editor. All though that might be a fun and stimulating project, it would involve hiring people to continuously read information to me from the game so I could match my program's output to the actual game's output. This would quickly become more costly than I could manage. Thanks again, Jordan.
Codr Posted August 5, 2012 Posted August 5, 2012 My solution does in fact work, as I expected. Even better, I barely had to change anything at all. Tabbing will take you through all 36 of the Pokemon icons, and the text associated with the icons (which isn't actually displayed) is read by Jaws. The problem is that the program is undergoing a series of changes bigger than any in its history, and I hadn't planned on a release any time soon. There are some pending bugfixes that need to be released before this major update, so I guess I can put this tab change in with the bugfixes and release a new minor version earlier than I planned. I'd say it'll be ready within a week.
GenuineCorruption Posted August 5, 2012 Author Posted August 5, 2012 Wow, this is amazing! At least I can still use pokesav to play regular black and white for the next week or so, as I'm not really interested in playing a game that doesn't yet have an english release out anyway. Thank you so much for taking this matter seriously. There are billion dollar software companies who couldn't care less about accessibility. Forgive me, but while I have your attention, may I ask you one last thing? With developer tools and hex editor in hand, I am determined to find some way to modify a black and white save so to reset the father and doughter scene (the one where Bianca meets dad in Nymbasa, he tells her she can't travel with pokemon, Elesa chimes in and he finally changes his mind). I know very little about hex editing, but I wrote a small tool to open the two saves (one with that scene unscene, one with it completed) and tested it byte for byte to see how much had changed. My results were puzzling; over 1000 bytes were changed! How! Why! So my next test (in progress) is to simply open the save before completion of the cutscene, wait a moment and save the game with a different .sav file name, round up all those bytes and place them on a "do not show" list in my program. My hopes are that ruling out bytes which obviously have nothing to do with whether or not the father and doughter scene has occurred, through process of elimination, will lead me to a reasonable number of bytes to experiment with until I finally do reset it's status. Do you *kinda* know where it is in the save, and why I'm coming up with over 1000 changed bytes when the only thing that should change when nothing's done is your play-time? Once I manage to rule out all the junk and find the byte (s) responsible for that scene, I can write myself a tool to reset it on any save (but I want it reset on my mane game). You're probably wondering why this matters to me, so I'll share a little: I love the music there. Though I can go online and listen to it at home, I want it on the go and the DS is perfect for that. I don't buy an IPod as it's the only thing I'd use it for, and so it's worth it to me to fight with these tools until I finally do reset that scene. Can anyone point me in the right direction? Thanks.
Codr Posted August 5, 2012 Posted August 5, 2012 I don't know anything about the location of that information in the save file. The byte changes are a result of Mystery Gift data being reencrypted every time you save with a time-based random number, if I remember correctly. There are a few other things that always change as well. I've taken 3.1.9's code and reapplied the bug fixes to it. The changes to the icons have been made and are ready. I have to make some changes to the update system before I can release a new version though. I guess I can send you this copy with it still labeled as 3.1.9 so you'll still get the release in a few days. I'll send a forum PM with a link.
GenuineCorruption Posted August 5, 2012 Author Posted August 5, 2012 Thank you. I just got up and am excited to try this out. Out of cureosity, will the major release you spoke of support editing records (badges and completion of other in-game events)?
Codr Posted August 5, 2012 Posted August 5, 2012 Out of cureosity, will the major release you spoke of support editing records (badges and completion of other in-game events)? Trainer information at the least was planned. I don't know about anything further than that yet. Edit: Have you tried it out yet? Just to be sure it works adequately.
TheOnlyPKMNmaster Posted August 5, 2012 Posted August 5, 2012 Hello Codr, thanks for taking Jorden seriously. It's been a big help to me! Thankyou!
GenuineCorruption Posted August 5, 2012 Author Posted August 5, 2012 Hello and thank you. As promiced I've sent in a donation of $50. I have downloaded and experimented with the new product. One suggestion I have, which would again make it hugely easier to use, would be to code those controls to also respond to the applications key when they have focus. This eliminates several steps which are involved in interacting with the controls, and insures that every screen reader will be able to use them. Still this is a huge improvement, thank you so much again for doing this!
Codr Posted August 5, 2012 Posted August 5, 2012 I didn't actually expect the donation. Thanks. As for keyboard input, I agree, and thought the same thing after testing it. I'll add some input to it in the actual release. I'll post here with the keys used, but they'll also be mentioned in the versions.txt file.
GenuineCorruption Posted August 5, 2012 Author Posted August 5, 2012 Hello. One other question I have is this: what are the two combo boxes which contain numbers 0 through 15? When Jaws tries to read the lables which correspond to those boxes, it says Pokerus. Do these boxes actually have something to do with that? To me, I'd have thought a pokerus option box would have three options (unexposed, infected and cured). Is this some advanced feature to edit pokerus status or something else?
Codr Posted August 5, 2012 Posted August 5, 2012 Yes, they're for the Pokerus. The data for the Pokerus is more complicated than just 3 states. The first value is, for the most part, just a random number when you encounter the virus. The second value indicates the number of days left for the virus to be active.
GenuineCorruption Posted August 7, 2012 Author Posted August 7, 2012 Hello. I have been trying non-stop since we last spoke to reset that event flag I mentioned before with no success. I was just wondering if you could give me a general idea of what event flags in these games tipically look like and how they change. My first effort was to make two saves with neither one having the event completed, do unimportant stuff like walk around and have my custome-made program put all changed bytes on a "do not show" list until finally there were very few bytes showing up. Then I did the event, compared the before and after saves and had all changed bytes that were not on the list reset. That didn't work. Then I tried looking for any obvious flag values which had changed between the before and after. I searched for 0 that became 1, 1 that became 0, 0 that became 3 (because I think it's responsible for earlier events as well like the plasma fight for the bike) and 3 that became 0. Though I've found a few of these types of bytes, changing them results in either no noticeable difference or a corrupted save which reverts to backup on load. Can you please tell me what these types of flags usually look like in black and white? Thanks.
Codr Posted August 9, 2012 Posted August 9, 2012 I may be able to get 3.1.10 out today. Keyboard input for the icons is available in it, although it doesn't allow you to move Pokemon from one slot to another like the visual interface does. The enter key lets you view data of the Pokemon in that slot. Shift + enter sets the data. The delete key (not backspace) deletes the Pokemon. The space bar toggles selection of that slot, which is used for code generation. Additionally, I've added more detail to the text associated with each icon that the screen reader tells you about. It now includes the Pokemon species as well as whether or not it's selected. It also indicates if the slot is empty.
GenuineCorruption Posted August 10, 2012 Author Posted August 10, 2012 Hello, and thank you. It's great that you have taken this seriously. I look forward to this release.
Codr Posted August 10, 2012 Posted August 10, 2012 I wasn't able to release it like I thought. There was an issue reported that I had forgotten about and am still fixing. It should be today, provided there isn't something else I've missed.
GenuineCorruption Posted August 10, 2012 Author Posted August 10, 2012 That's awsome. I'd like to ask you one quick thing though. Can you give me any pointers that'd help me recalculate save file checksums? I've almost succeeded in editing that scene data, I know you're not familiar with that information however PokeGen is able to fix the checksum after I've edited the data (though it seems I have to edit something in PokeGen before it will react to my saving). Nothing against your program as it's amazing, but I'd like to be able to make event edits with a single program. Can you please give me some information on how to locate the checksum within a save file and what the scheme is for recalculating it? This is an area I'm not familiar with. Thanks.
Codr Posted August 11, 2012 Posted August 11, 2012 If you want to recalculate the checksums for Black/White, edit whatever data you need to, then modify that same data the same way in offset + 0x26000. PokeGen will then save the checksums properly for you. As for details on how it works, ugh. http://www.projectpokemon.org/wiki/Pok%C3%A9mon_NDS_Save_File_Checksum I'm not sure how easy that'll be for you to interpret with a screen reader though.
GenuineCorruption Posted August 11, 2012 Author Posted August 11, 2012 Hello. I got a chance last night to read through what you linked me to. It refers only to diamond, pearl and platinum. Will that still work in Black and White? I'm assuming that the offsets mentioned in the code are the offsets where the checksums are stored at? Later tonight I'll be attempting to convert that code and try to figure it out. Thanks again.
Codr Posted August 11, 2012 Posted August 11, 2012 The method used is still the same. The offsets are for Diamond/Pearl/Platinum. There are many more checksums in generation 5 games. I'll send you a forum PM.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now