farkam135 / GoIV

https://www.reddit.com/r/goiv
Other
372 stars 139 forks source link

Translation, Gym helper #69

Open Dreckiger-Dan opened 8 years ago

Dreckiger-Dan commented 8 years ago

Gym-Helper

What is it?

Have you ever been near a gym and wanted to know which pokémon you should take to your fight? The gym-helper will show you useful information about your opponent's pokémon so you can decide more easily.

Todo-List

If you know other useful resources, please let me know.

Original message

I am currently working on putting all strings into the strings.xml. Done

What do you think about showing a list of pokémon that are good against the pokémon in the gym on the gym screen? I'm going to try to implement it once I have extracted all the string.

nahojjjen commented 8 years ago

Could you elaborate what you mean? Do you mean type advantages?

A sketch of how the feature could work (paint sketch is fine) to help us understand would be great.

Dreckiger-Dan commented 8 years ago

gym

Yes, I mean type advantages.

Dreckiger-Dan commented 8 years ago

I think, I'm going to use the white outline of the gym picture and the platform the trainer is standing on to check if the screenshot is a gym-screen...

@farkam135 how did you calculate the areaX1, areaY1, ... values?

sarav commented 8 years ago

This feature would be very useful! I can't remember all the different type advantages and end up picking terrible ones. Btw, isn't Jolteon technically good against Vaporeon, but it's still a bad choice in PoGo? What data should this Weak/Strong against use?

A lot of people rename their pokemon though. I guess this is better than nothing.

hlplulustg commented 8 years ago

I wonder what information would be most useful. There's not only the aspects seen in the picture. It's more to consider:

That's information on the defending pokemon (which is all the app could supply). Now the best attacking pokemon would be utilizing the defending pokemons Weakness for its moves and the defending pokemons Weak attack for the choice of type. Only if the combination is applicable of course.

The type advantage charts seem complementary but unfortunaley they are not.

What data should this Weak/Strong against use?

Based on that information people can choose a corresponding pokemon for attacking utilizing further information such as moveset.

A lot of people rename their pokemon though.

The names are only visible for the trainers themselves so this wouldn't be a problem.

nahojjjen commented 8 years ago

Just fyi Type advantage isnt x2 dmg in pokemon go, its x1.25

https://www.reddit.com/r/TheSilphRoad/comments/4t8seh/pokemon_go_type_advantage_chart/

hlplulustg commented 8 years ago

Right, they lowered that for pokemon go and resistance is gone. Comment adjusted.

sarav commented 8 years ago

Here's another good resource for Pokemon data. It's well organized and well explained.

https://pokemongo.gamepress.gg/pokemon-list

Dreckiger-Dan commented 8 years ago

I'm not super familiar with android dev. Would it be a good idea to create a new Service where all the screenshot and scanning code will be put or is it bad to create multiple services?

sarav commented 8 years ago

Anything that's not actively UI related seems like something that should be in a service or a pure helper class. Anything that's interacting with the user should be in an Activity. I'm not an android dev either, but that just feels right.

The stuff like scanning the bitmap, etc doesn't seem like it should be an activity or a service. Those just seem like helper classes. I think the Pokemon class should have constructors that could take the pokemon level, HP, etc and evaluates the various IVs possibilities and the rest of the details. An OCRhelper class to process bitmaps and return the values, etc.

Only the screen monitoring seems like something that should be in a service. The OCR result screen which allows the user to fix the values, etc seems like it should be a floating activity.

farkam135 commented 8 years ago

@Dreckiger-Dan sorry for the super late response, i calculated those areas using my own device and then just finding the ratio in relation to width and height. Also i'd listen to @sarav, i'm not an android dev either and GoIV's codebase is really messy and needs a lot of outsourcing, I know it's a terrible way to do it but once all the base features are working then i'll go ahead and move things around, but I recommend with your feature just start off with good practices!

sarav commented 8 years ago

I'm kinda hijacking this issue since it's talking about refactoring. @nahojjjen, Thanks a lot for the refactoring. It's so much better and readable. I understood the code before, but didn't have the time to clean it up before making changes. Now it's a lot more manageable.

nahojjjen commented 8 years ago

I'm glad my efforts weren't wasted

sarav commented 8 years ago

I even made a commit that got merged. I think that was a fix for your refactor though :)

sarav commented 7 years ago

@nahojjjen You seem to be the OCR expert. Want to give this a shot next? This would be very useful for people like me (when I actually play the game instead of coding GoIV) who can't remember the weakness types for Pokemon.

nahojjjen commented 7 years ago

@sarav is what you're requesting that I make the screen scan detect when a user is viewing a gym?

sarav commented 7 years ago

Well, the whole feature :D

I'm not a UI expert either. Obviously, it's your choice to work or not on this. But I think it's better to have you spend time on something only you can do.

Dreckiger-Dan commented 7 years ago

little update: I currently have no time to work on the project because of school/work. I also don't play Pokemon Go that much anymore. Maybe it is better if somebody else implements this feature... Sorry for letting you wait for so long :pensive:

rpgrca commented 7 years ago

Someone at reddit said they wanted to create a GoIV-like framework where plugins could be added, I think that would be the best approach for this. One plugin would be to work with IV, another plugin would be the gym helper, another plugin could be potion-manager (optimize usage of potions across hurt pokemon, for example), pokemon capture location logging, etc.

sarav commented 7 years ago

Ehhh... I don't think the gym helper needs to be a plugin. That seems to fall under GoIV's main strength - detecting screens and doing OCR. But for the data analysis (off game and off app) and storage part, yeah, I agree that plugins might work.

rpgrca commented 7 years ago

My bad. I was thinking gym-helper was actually the data analysis of the information obtained, whereas GoIV would give a framework (Go! for example) from where it would trigger the different registered plugins (IV, gym-helper, etc).

GoIV is actually about analyzing IV, so I feel somewhat uncomfortable when I read about adding stuff that's not actually IV-related to the main application (and thus would prefer if a separation was made, for example via plugins). I have no idea where PokemonGo would go from now, but if they eventually add gender to pokemon and the ability to breed and trade (just like Pokemon Diamond/Pearl had), a branch of players might be only interested in the IV/moveset analysis to breed perfect pokemon, and might get bothered by having extra layers of processing (like gym helper, for example). So, it's important to let the user turn on/off each of them individually.

sarav commented 7 years ago

It won't be any extra layer. Just don't press the button on the gym view? Anyway, we are debating a hypothetical case. It's not like we are writing a plugin framework right now.