Unlucky-Life / ankimon

Ankimon is a Anki Addon to Gamify your learning experience
Other
68 stars 6 forks source link

Lost Main Pokemon? #144

Closed LeviLewinsky closed 3 months ago

LeviLewinsky commented 3 months ago

A day or two ago I was using my level 45 Riolu and then I exited the Anki app. When I got back on, my Riolu was nowhere to be found; not even in my pokemon collection anymore. Not sure what happened.

Unlucky-Life commented 3 months ago

Ah hm dont know why. But you could send me you mainpokemon.json and mypokemon.json file and ill check it out !

Unlucky-Life commented 3 months ago

Then i can reimburse you your riolu

LeviLewinsky commented 3 months ago

mainpokemon.json mypokemon.json

The main pokemon I'm using right now is Rayquaza

LeviLewinsky commented 3 months ago

If you could leave Rayquaza as my main and just reimburse the Riolu, I can change him back to my main at a later date after I level up Rayquaza for a while.

Unlucky-Life commented 3 months ago

@LeviLewinsky mypokemon (10).json no worries, here you go :)

LeviLewinsky commented 3 months ago

It happened again? My app is still open and I am still fighting using Rayquaza, but suddenly all my Rayquaza's in my collection (I had several) have disappeared. My current Rayquaza is level 85; I don't want to close the app for fear of losing it, but I also don't see it anywhere in the mainpokemon or mypokemon files.

Unlucky-Life commented 3 months ago

ah damn => Did you use the latest release on GitHub ? Try to find the files under this path if your on Windows: C:\Users(Here is your username)\AppData\Roaming\Anki2\addons21\1908235722\user_files

=> There should be the mainpokemon.json and mypokemon.json file

Do you know how it happened ?

Unlucky-Life commented 3 months ago

Basically if you tell what lvl your Rayquazas are then i can reinject them anytime But did you try to release your Rayquaza from your collection ? Currently the code poorly handels Pokemon of the same species.

LeviLewinsky commented 3 months ago

I checked the file path, it still wasn't there. I was able to reinject it and just adjust the level from an earlier save I had from quite a few levels back, but that only replaced the one Rayquaza. As far as releasing it, no I haven't attempted to release any of them. I hadn't even closed the Anki app recently (which is when I originally lost the Riolu a while back). This time I was just going through my cards like normal and it just got rid of my main pokemon and every other copy of that pokemon I had in my collection.

LeviLewinsky commented 3 months ago

Now that I realize I can just reinject it myself if I lose it again, I can just do that if it happens; but I'm still pretty confused as to why it might have happened! haha

Unlucky-Life commented 3 months ago

As far as releasing it, no I haven't attempted to release any of them. This time I was just going through my cards like normal and it just got rid of my main pokemon and every other copy of that pokemon I had in my collection.

Yea thats due to how the code was written - basically once you gain xp it tries to save the mainpokemon data to the mypokemon collection => sadly I was just learning how to code in python and wrote it poorly => so that it searches for the pokemon name and every pokemon with the same name is inserted as the mainpokemon

Unlucky-Life commented 3 months ago

@LeviLewinsky I believe its due to the poorly written code, but I am trying to rework it currently

But good that you know how to reinsert ! Let me know if you need help again !