GithubHelp home page GithubHelp logo

mirekdlugosz / create-pokemon-team Goto Github PK

View Code? Open in Web Editor NEW
12.0 12.0 4.0 2.58 MB

Web application that helps you build your own Pokémon team in any core series game

Home Page: https://createpokemon.team/

License: GNU Affero General Public License v3.0

Python 48.08% HTML 10.96% TypeScript 35.64% JavaScript 0.88% SCSS 4.44%

create-pokemon-team's People

Contributors

aes421 avatar alexhoffman617 avatar mirekdlugosz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

create-pokemon-team's Issues

Setup continuous integration system

Continuous integration system should help us ensure that builds can be performed automatically and predictably.

One-click deployments could be the next step, but this might require setting up new hosting provider.

Refactor move effectiveness code

Computing move effect code is duplicated in three places:

  • frontend/src/app/components/team-overview/team-overview.component.ts
  • frontend/src/app/components/team-type-effectiveness/pokemon-type-effect/pokemon-type-effect.component.ts
  • frontend/src/app/services/typeeffectiveness.service.ts

It belongs to service. Service should be refactored to provide API that can be consumed by components; components should use this new API exclusively.

Historical physical/special split is ignored

Before gen IV, category (physical / special) of attack was tied to its type. E.g. all Rock-type attacks were physical and all Ice-type attacks were special.

We completely ignore that. If you select e.g. Yellow, then "Hyper Beam" will be displayed as special - even though it was physical back then.

This is low priority, as we never use physical / special information anyway. It is there only to make it easier to find move that will deal more damage when used by certain Pokémon (as Pokémon have one attack stat higher than another), but in old games the same information is already contained in type.

Display Pokémon (and moves?) names in table

User ageoftesla commented on reddit that team overview section should display list of Pokémon with resistance, weakness or super effective moves (and for moves, maybe also list them). This is useful information for users to see, but displaying it instead of numbers would grow table considerably - most likely to the point where it's not easy to digest all information at once.

This issue is to brainstorm ideas for compromise between these two requirements. Display more details on request? Below number? In new window / screen? In popover? Some switch between overview and detailed view? Something else?

Improve visuals of the page

While our design is clean and minimalistic, it lacks eye-candiness that other team builders have. Something as simple as adding Pokémon icons might improve user-experience and time they spend with our tool.

This task is for brainstorming ideas how our visuals might be improved.

Basic Pokémon Showdown! pokedex reader

Create new class in data-manager/pokedexreader/readers.py able to read Pokemon Showdown! JSON files (#25) and putting data into our Pokedex, which will handle writing it out.

This is about basic integration code between new module and existing infrastructure. It's not required to pay attention to details such as games/generations differences, different ids used by veekun and Showdown, edge-case Pokemon or moves like Arceus, Mega evolutions or Alola forms.

Extend data manager to read Pokemon Showdown! files

Pokémon Showdown! is exhaustive source of information about Pokémon games since gen III. It has two advantages over veekun:

  • Bigger community, meaning faster support for new games
  • Movesets include event moves

It would be great if our data-manager could support Pokémon Showdown! files as data sources.

For starters, it could use Pokémon Showdown! as only source of data. Eventually it should be able to read veekun data and add missing pieces from Pokémon Showdown!.

Pokémon Showdown! data is held in JavaScript arrays that are not readable by standard JSON parsers. It must be first transformed to JSON. See data-manager/data-source/js-to-json.sh in ac3d664 for one way to transform it.

Both Pokémon and move names differ a little between veekun and Pokémon Showdown!. Some way to transform names from one space to another must be found. Similar problem must be solved as part of Issue #9. It would be really cool if we could find a way to solve both without code duplication.

DEPRECATION WARNING in libsass

ng build

 56% building modules 389/390 modules 1 active …e-pokemon-team/frontend/src/styles.scssDEPRECATION WARNING on line 21, column 8 of stdin:
Including .css files with @import is non-standard behaviour which will be removed in future versions of LibSass.
Use a custom importer to maintain this behaviour. Check your implementations documentation on how to create a custom importer.

This comes from ng-select, that ships css files in npm module. This task can be closed when warning goes away.

Narrow down list of Pokemon to choose from

Reddit user Sayakai writes:

This (...) seems to be less than ideal for any case where you're still trying to build a team, and haven't decided on team members yet, there's no option to exclude Pokemon from the long list based on parameters.

  • type
  • resists x
  • NOT type
  • NOT weak to x

Those would be the primary ones coming to mind. It would be helpful if those could be set as a list of flags or tags, or something like that.

I agree that the "when" question would be very helpful, and I think the key here is "before gym #x". That's fairly uniform until gen 6. Gen 7 is harder to implement, though here separating per island would probably work.

Idea is great, what we lack is design (what forms should we display? where? do we put user choices in URL somehow, or not? what if user choices are contradictory or no Pokemon actually meets all the criteria?) and manpower to implement it.

It makes perfect sense for me to tackle search dimensions (type, resists X etc.) one at the time. "When" is whole different game, probably with lower priority.

Testing ideas:

  • make sure that selections do not affect already selected Pokemon
  • what if form would give empty results in other game? what if form doesn't make sense in other game (e.g. search for Dark Pokemon and switch to Yellow)?
  • does it handle type chart changes across games? Pokemon that changed types?
  • does selection affect every Pokemon selector (when clicked)? Non-empty? First non-empty? First in unbroken stream of non-empty?
  • Pokemon with one type, with first type and with secondary type selected in different fields

Allow for fast switching between form and data view

Page is mostly used in iterative way, when you input some data, analyze results and change input data to account for things that you don't like; process is repeated until you come with results that you want. This means that users jump between form and data result tables many times.

We try to make it fast for users to jump to information they need, but we might not be doing the best job. This task is about figuring the fastest and easiest way and implementing it.

One idea is "Jump to top" / "Jump to results" buttons / links. The problem here is that we don't necessarily know what part of results user wants to see.

This issue is most prevalent on cell phones, so it should be hidden / easy to ignore on devices with higher resolutions.

Wrong order of Slowpoke evolution line in Sword Shield

In Sword/Shield, Slowpoke evolution line is displayed as:

  • Slowpoke
  • Slowbro
  • Galarian Slowpoke
  • Slowking
  • Galarian Slowbro

While it should be:

  • Slowpoke
  • Galarian Slowpoke
  • Slowbro
  • Galarian Slowbro
  • Slowking

Fix should be applies in data-manager component. Most likely places are pokedexreader/storage.py, function _output_pokemon; and pokedexreader/constants_pokedex.py.

Reuse team-overview and team-type-effectiveness on help page

We use output created by team-overview and team-type-effectiveness in help page. Not only this looks terrible in source code, but also require us to keep help page structure in sync with actual output of application. It would be nice if we could just use Angular components instead.

One major problem is that both of these components are tied to team definition (provided by team service), which describes empty team on static pages.

Don't assume newer generation includes all Pokemon from previous generations

One of biggest changes in Sword and Shield is going to be break with series-long tradition that new generation built upon previous generation, including all the same Pokemon (even if they were not obtainable at first). In other words - all games until Ultra Sun and Ultra Moon supported all Pokemon created in previous games.

Our data-storage part builds on that assumption, always appending new Pokemon to list from previous generations. This needs to stop.

Things to consider:

  • we need a way to express which game/generation is self-contained and which includes data from previous generations
  • how data sources deal with data duplication? If I remember correctly, veekun has full list for each game (as, due to type changes, Jigglypuff from gen 1 is not the same as Jigglypuff from gen 6), while Showdown maintains single list of national dex
  • should we break assumptions about "transferred" flag, too? So far we know that certain Pokemon won't be available in Sword and Shield, but these that are available will be able to be transferred from previous games (eventually). But possibly Gamefreak will break that at one point in future and Pokemon transferred from previous generations will forget certain moves?

Handle non-Mega form when Mega evolution is selected

It seems that (some?) users expect to see details of non-Mega form when they add Mega evolution to team. That makes perfect sense, as Mega evolution is done by the player during the battle. Probably we should account for that somehow.

One way is to implicitly add non-Mega form when Mega is selected (potentially creating team with more than six members in the process). But this might be confusing, so other ideas are welcome.

[Showdown] Deoxys in Ruby/Sapphire knows Superpower

Deoxys in Ruby/Sapphire knows Superpower, while this is move that only Deoxys (Attack Forme) can learn, and in generation III deoxys can't change forms at will (as each form is tied to single game).

Overall, there are few instances where Pokemon have multiple forms, forms can be changed at any time and know different moves, but certain game has only one form available:

  • Deoxys in gen 3
    • ruby-sapphire has only "deoxys" (normal)
    • emerald has only "deoxysspeed"
    • firered-leafgreen has only "deoxysattack" and "deoxysdefense" (technically, Fire Red has Attack, while Leaf Green has Defense, but we always consider games in pairs)
  • Giratina in gen 4
    • diamond-pearl has only "giratina"
    • platinum has both "giratina" and "giratinaorigin"
  • Shaymin in gen 4
    • diamond-pearl has only "shaymin"
    • platinum has both "shaymin" and shayminsky"

STAB is missing from table

As reported by reddit user /u/coolbond1, there is no mention of STAB (Same-Type Attack Bonus) anywhere in the table. It's reasonable to expect it to be included.

This may be included in both "Team overview" and "Team type effectiveness" sections, or only one of them.

Allow user to select what data should be displayed

As suggested by reddit user /u/PureRok, it would be nice to highlight / grey out types that your team can't hit supereffectively.

We can't do it right now, as there is other data displayed along no. of SE moves, and highlighting based on only one variable will be confusing.

But instead we probably could allow user to select what data he or she wants to have displayed. So if user is looking for SE moves against given type, let them hide no of resisting, no of weak to and counter.

This could allow to include more data as well without making UI completely worthless, as additional data can always be hidden (or maybe even hidden by default, in case of something extra-specific).

Social media sharing buttons

Maybe we should have social media sharing buttons somewhere? Probably at the bottom of the page.

Buttons should share current team, not page as a whole.

Social media sites to consider:

  • Facebook
  • Twitter
  • Google+
  • Pinterest?
  • Snapchat?
  • ???

[bug] too many moves in Sword/Shield?

Rumor has it that Sword/Shield actually removes moves in addition to removing Pokemon.

Recently we did make quite a big refactoring to ensure that each game can define what Pokemon are available in it, but we have not made any special precautions for moves.

Things to check:

  • Pokemon that used to know certain move can no longer know it
  • can Smeragle use any of illegal moves? (if Smeargle even is in the game)
  • what will happen if Pokemon that knows the move is transferred from older generation?

This is fake issue I will close in a moment, but first I need to change title

Thanks for contributing to createPokémon.team!

Questions below are here to get you started. You may answer as many of them as you like, or none at all. Feel free to remove everything that does not apply to your situation, including this message.

What kind of issue that is?

  • a bug report
  • a new feature request
  • a question

Short description of your issue

What have you done before encountering the problem? It's better to give too many details than miss something important

What did you expect to happen?

What happened instead?

FileNotFoundError: [Errno 2] No such file or directory pokemon.json

Thanks for contributing to createPokémon.team!

Questions below are here to get you started. You may answer as many of them as you like, or none at all. Feel free to remove everything that does not apply to your situation, including this message.

What kind of issue that is?

  • a bug report
  • a new feature request
  • a question

Short description of your issue

Just trying to run the backend:

$ ./run.py

FileNotFoundError: [Errno 2] No such file or directory: '.../create-pokemon-team/backend
/api/data/pokemon.json'

What have you done before encountering the problem? It's better to give too many details than miss something important

What did you expect to happen?

What happened instead?

Create script converting Pokémon Showdown! files to portable JSON

See git show 99e09c1bf934deebff5754cc1c069af167e4a231:data-manager/data-source/js-to-json.sh for inspiration.

This must be done in JavaScript / Node, as this is only platform capable of reading source files.

Expected usage proposal:

$ ./prepare-showdown-json --source /path/to/Showdown/data --output-dir /path/where/JSON/will/be/

Make weak points of the team more visible

Each team has some weak points. This tool primary purpose is to assist in identifying them. We could do much better job in that department.

In this issue, we brainstorm answers for following questions:

  • What are possible weakness metrics for a team?
  • Which of these metrics we should implement?
  • How we should display them to the user?

Ensure site backwards compatibility after #27

Fixing #27 might break backwards compatibility (i.e. we switch all ids to these used by Showdown). This task is to ensure that bookmarks created in current master (45809a1) continue to work.

In other words, translation between old and new ids is required on UI or API level.

Contextual help for data tables

Our tables should be understandable by seasoned Pokémon players, but might be a bit cryptic for beginners, especially as we use different abbreviations to save space. We do have help page that hopefully does a good job at explaining them, and we do expose help in visible space, but let's face it - nobody reads help pages. There should be some way of learning meaning of different metrics right on the main page.

This contextual help should stay out of the way of people who are already familiar with the site.

One way might be popovers displayed on hover. Bootstrap uses Popper.js. Popovers should be visible on mobile devices as well.

Support games / generations in Pokemon Showdown pokedexreader

veekun data is game-oriented, while Pokemon Showdown is more generation-oriented. It's easy to translate from game to generation, but hard to translate from generation to game (as you basically need to maintain list of things added in second game).

Our app is game-oriented, which poses a problem while integrating with Pokemon Showdown.

We need to find and implement a way for pokedexreader Pokemon Showdown reader to output correct data for correct game.

Translation layer for veekun and Showdown in pokedexreader

veekun Pokedex and Pokemon Showdown! are using different ids for Pokemon and moves. We need to align them in order to be able to create single pokedex from multiple sources in pokedexreader.

My idea is:

  • use moves ids from Showdown
    main difference is that veekun uses dash in place of space, while Showdown removes spaces and dashes. It's easy to translate veekun to Showdown, but very hard the other way around (would require a lot of heuristics and extensive list of hard-coded translations)
  • use pokemon ids from veekun
    most pokemon ids are the same in both games. List of differences is relatively small and would be easy to contain in constants file. Using veekun ensures backwards compatibility.
    On the other hand, it might create chaos down the road, if veekun is updated and our Showdown-ids don't match. We would then need to add veekun -> Showdown translations, but only for game FooBar and later. So might as well switch to Showdown now and deal with backwards compatibility only once.

Providing Showdown -> veekun translation might be as easy as creating veekun -> Showdown map and swapping key with value:

veekun_to_showdown = {item: item.replace('-', '') for item in veekun_moves}
showdown_to_veekun = {val: key for key, val in veekun_to_showdown.items()}
two_way_map = {**veekun_to_showdown, **showdown_to_veekun}

However, this will couple Showdown reader with veekun reader - veekun will be allowed as standalone data source, while Showdown will be always only auxiliary data source.

Add support for moves using their own type chart

Since gen VI, there are now moves that use non-standard type effectiveness chart. As of now, they are: Flying Press, Freeze-Dry and Thousand Arrows (see current list on Bulbapedia). We do not support them, treating them as normal moves of their types.

We already have stub of move properties overriding mechanism in place - we use it to change type of move depending on current game version. It should be generalized for this feature.

Overrides should be generated on data manager level and then processed in frontend. Code pointers:

  • data-manager/pokedexreader/constants.py
  • src/app/services/typeeffectiveness.service.ts

Tutor moves in USUM are missing

Reddit users report that they can't choose tutor moves on Ultra Sun and Ultra Moon. This is most likely caused by partial data dump of USUM on veekun side.

The correct way of solving this is extending our data-manager to read Pokémon Showdown! data and combine both sources. This is covered by issue #13.

As faster, ad-hoc solution we could leverage eeveedex_missing_moves constant (defined in data-manager/pokedexreader/constants.py). It could be created manually, but better solution would be to generate it automatically from Pokémon Showdown! data. We could have small, independent generation tool coded right now and refactor it as part of #13 later on.

Techno-blast is always Normal type

Genesects signature move Techno Blast changes type depending on drive that Genesect holds. However, it is always Normal-type in our app.

We have API to tell client-side that move has varying type, but only as "move changes type to match Pokemon (only/primary) type". That works for Judgment (Arceus signature move), Multi-Attack (Silvally) and Revelation Dance (Oricorio), but doesn't work for Genesect, since Genesect never changes type.

Add support for Brilliant Diamond / Shining Pearl

Preliminary support for BDSP is added in brilliant-diamond-shining-pearl branch. However, we can't merge and deploy it because:

  • Pokemon Showdown is missing data on some Pokemon (current count says 158, but that includes 18 formes of Arceus, 4 Deoxys etc.)
  • "I have Pokémon transferred from earlier game" should be conditionally hidden in UI when BDSP is selected

We probably need to gradually add missing Pokemon data into Showdown and only then deploy.

List of missing Pokemon:

['aipom', 'ambipom', 'ampharos', 'arceus', 'arceusbug', 'arceusdark', 'arceusdragon', 'arceuselectric', 'arceusfighting', 'arceusfire', 'arceusflying', 'arceusghost', 'arceusgrass', 'arceusground', 'arceusice', 'arceuspoison', 'arceuspsychic', 'arceusrock', 'arceussteel', 'arceuswater', 'ariados', 'banette', 'bastiodon', 'bayleef', 'beautifly', 'bibarel', 'bidoof', 'breloom', 'buizel', 'burmy', 'cacnea', 'cacturne', 'camerupt', 'carnivine', 'cascoon', 'castform', 'chatot', 'chikorita', 'chimchar', 'chimecho', 'chingling', 'clamperl', 'cranidos', 'croconaw', 'cyndaquil', 'darkrai', 'delcatty', 'deoxys', 'deoxysattack', 'deoxysdefense', 'deoxysspeed', 'donphan', 'dustox', 'empoleon', 'feraligatr', 'finneon', 'flaaffy', 'floatzel', 'forretress', 'furret', 'girafarig', 'glameow', 'gligar', 'gliscor', 'gorebyss', 'granbull', 'grotle', 'grumpig', 'gulpin', 'hariyama', 'honchkrow', 'hoppip', 'houndoom', 'houndour', 'huntail', 'illumise', 'infernape', 'jumpluff', 'kecleon', 'kricketot', 'kricketune', 'ledian', 'ledyba', 'lumineon', 'luvdisc', 'magcargo', 'makuhita', 'manaphy', 'mareep', 'masquerain', 'medicham', 'meditite', 'meganium', 'mightyena', 'minun', 'misdreavus', 'mismagius', 'monferno', 'mothim', 'murkrow', 'nosepass', 'numel', 'pachirisu', 'phanpy', 'phione', 'pineco', 'piplup', 'plusle', 'poochyena', 'prinplup', 'probopass', 'purugly', 'quilava', 'rampardos', 'sentret', 'seviper', 'shaymin', 'shayminsky', 'shieldon', 'shroomish', 'shuppet', 'silcoon', 'skiploom', 'skitty', 'slaking', 'slakoth', 'slugma', 'snubbull', 'spinarak', 'spinda', 'spoink', 'stantler', 'staraptor', 'staravia', 'starly', 'sunflora', 'sunkern', 'surskit', 'swalot', 'swellow', 'taillow', 'teddiursa', 'torterra', 'totodile', 'tropius', 'turtwig', 'typhlosion', 'unown', 'ursaring', 'vigoroth', 'volbeat', 'wormadam', 'wormadamsandy', 'wormadamtrash', 'wurmple', 'yanma', 'yanmega', 'zangoose']

Add edge-cases support in Pokemon Showdown pokedex reader

Once #26 is done, extend Pokemon Showdown pokedex reader class to support edge cases:

  • moves changing type depending on Pokemon type, item, terrain or weather (e.g. naturalgift, judgment, multiattack, revelationdance)
  • Pokemon with different forms (Meowstic Male and Female)
  • Pokemon freely changing forms (Arceus, Genesect, Hoopa etc.)
  • Mega evolutions
  • Regional variants (Alola - pay special attention to evolution lines, as sometimes previous evolution is Alolan and sometimes it is normal)
  • data to ignore (see _ignore_pokemon in Eeeveedex reader - Totem Pokemon, Greninja forms, Cosplay Pikachu etc.)

Pokemon Showdown! integration

Pokémon Showdown! is widely used Pokémon battle simulator. Team description format it uses is de-facto standard for Pokémon community.

It would be cool to support that format as well. Users should be able to import their Pokémon Showdown! teams into our tool and export team from our tool into Pokémon Showdown!

UI for this new function must be designed. It might be popup-like box with textarea accessible on click of button. Button should be visible, but easy to ignore for people who don't use Pokémon Showdown!.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.