Code Monkey home page Code Monkey logo

idleon-saver's Introduction

Idleon Saver

Build Test Coverage Status Maintainability Code style: black

Converts Legends of Idleon Steam save files to and from JSON with a friendly GUI that makes it easy to export your save data to Idleon Companion, Cogstruction, and other tools.

How to Use

  1. Run Steam, since Legends of Idleon won't run without Steam.
  2. Download IdleonSaver.exe from Assets in the latest release.
  3. Run IdleonSaver.exe from your download folder.
  4. If you get a "Windows protected your PC" popup window, click "More info" then "Run Anyway".
  5. Follow the instructions displayed in the app.
  6. On the export screen, click "Show Files" to open the folder containing your exported data.

For Developers

Disclaimer

Use at your own risk.

MAKE BACKUPS before using and DO NOT USE THE ENCODER ON YOUR REAL SAVE DATABASE!

I do not endorse using this tool to edit your live save files. This tool is for educational and investigative purposes only.

Setup

Use either poetry install (recommended) or pip install . to install dependencies. If using poetry, replace python with poetry run python in this document (or run from a poetry shell).

If using leveldb scripts, copy your database to a test location (default is ~/dev/leveldb). For example:

cp -r ~/AppData/Roaming/legends-of-idleon/"Local Storage"/leveldb ~/dev/leveldb

Updating idleon-data

If idleon-saver/idleon-data/ is empty, make sure to run the following command from your project root:

git submodule update --init --recursive

Running the GUI

To launch the GUI, run python idleon_saver/gui/main.py.

Running scripts directly

Preamble

The first iteration of this project used scripts that interact with the leveldb directly instead of launching the game. The flakiness of plyvel on Windows has prompted me to abandon that route, which is why the GUI doesn't use the leveldb scripts.

However, these scripts are still available for use if desired.

Usage

You can pass --help to any script to see the arguments it takes. If your paths don't match the defaults, you'll need to pass your paths to the scripts.

Script arguments:

Argument Description Default
-n, --idleon Legends of Idleon install path C:/Program Files (x86)/Steam/steamapps/common/Legends of Idleon
-l, --ldb Path to the leveldb to work with ~/dev/leveldb
-w, --workdir Working directory where files will be created <package directory>/work
-i, --infile Input filename Varies by script
-o, --outfile Output filename Varies by script

python idleon_saver/scripts/decode.py will decode leveldb data into 2 JSON files:

  • decoded_plain.json, which is easier to read, and
  • decoded_types.json, which contains all the information required to re-encode the data back into the leveldb.

python idleon_saver/scripts/encode.py will encode the data in decoded_types.json back into the database.

After you've obtained your decoded_plain.json, you can export it into formats used by community tools with python idleon_saver/scripts/export.py. This script takes two additional arguments:

Argument Description Default Choices
-t, --to Community tool format to export your data to idleon_companion idleon_companion, cogstruction
-s, --source The save data's origin, which determines its structure firebase firebase, local

The idleon_companion option produces idleon_companion.json for import into Idleon Companion.

The cogstruction option produces cog_datas.csv and empties_datas.csv for use with Cogstruction.

Data obtained from inject.py (or the GUI) is in the firebase format, while data obtained via decode.py is in the local format.

Contributing

Feedback, suggestions, and contributions are welcome!

Use poetry install --with dev,test to install the optional dependencies. Run tests with pytest. Please run Black before submitting a PR; I have it configured to run on save. Thanks for reading!

Credits

idleon-saver's People

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

idleon-saver's Issues

outdated

Describe the problem
A clear and concise description of what the bug is.

To Reproduce
save Json
Try to upload to idleoncompanion.com
does not like the format

Expected behavior
A clear and concise description of what you expected to happen.

Log file
Please attach your log file, found at %APPDATA%\IdleonSaver\idleon_saver.log.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Add any other context about the problem here
log_21-12-07_0.txt
.

Inject API Downloader

Injecting Corbeno's API Downloader instead of downloading the Stencyl data from localStorage would mean we don't have to write a separate parser for the JSON decoded from Stencyl (#2).

This would take some work on inject.js and inject.py. The biggest obstacle is that the game client appears to make the relevant API requests before the document is ready, so electron-inject hasn't injected the script yet. Additionally, the API Downloader is a browser extension, so it needs to be refactored to work as an injected script. I made some progress with this but I was ultimately unable to get it to work correctly, probably because I'm not a JavaScript developer.

Saving File Path

It'd be really handy if the app actually saved where my idleon exe is, since it's on a different drive I have to manually copy and paste the path every time, which can be a bother. It already has a folder in appdata, so I figured it wouldn't be too much else to save a small config. I'll open a pull request if I end up figuring it out.

Unable to export Idleon Companion data

Describe the problem
Unable to export to Idleon Companion. Cogstruction export seems to work fine.

Log files
Please attach your logs.zip file, found at %APPDATA%\IdleonSaver\logs.zip.
logs.zip

Desktop (please complete the following information):

  • OS: Windows 11

Additional context
Downloaded latest version just to be sure (same version). Same problem.

Encountering Error when Exporting to Idleon Companion

Describe the problem
When export to idleon companion is clicked, an error "Oops! Something went wrong." is displayed.

Log files
Please attach your logs.zip file, found at %APPDATA%\IdleonSaver\logs.zip.
logs.zip

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Windows 10

Additional context
I've tried deleting the folder and using different versions of idleon saver with the same result. Cogstruction functionality works.

Idleon Companion Export Fails

Describe the problem
A clear and concise description of what the bug is.

Log files
Please attach your logs.zip file, found at %APPDATA%\IdleonSaver\logs.zip.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Windows 10]

Additional context
logs.zip

Export to Cogstruction does work.

Failing to export to companion (again)

Describe the problem
Failing to export to companion, tried all the 'fixes'

Log files
Please attach your logs.zip file, found at %APPDATA%\IdleonSaver\logs.zip.
log_22-04-05_1.txt

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11

Additional context
Last time it was because of an unequipped constellation

KeyError on `xmasEvent3` card

Describe the problem
When clicking export to idleon companion, i get an error that says Ooops something went wrong and to submit a bug report with the logs zip file and the idleon_save.json file attached. Won't let me attach json files so I made the save a .txt and attached it

To Reproduce
Steps to reproduce the behavior, for example:

  1. Start the Saver
  2. Let it run then click export
  3. See error

Expected behavior
To have the export json file saved properly for use w/ idleoncompanion.com/import

Log file
Please attach your log file, found at %APPDATA%\IdleonSaver\idleon_saver.log.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [Windows 10]

Additional context
Add any other context about the problem here.
logs.zip
idleon_save.txt

KeyError: "xmasEvent3"

Describe the problem
When I try to export the data to Idleon Companion I get the error:
image

If I try to manually upload it:
image

I can't seem to make Idleon update the data, even though I tried all the listed methods:

  • log in to all your characters
  • open and close the game
  • do things in-game like fighting monsters, changing presets, leveling up, etc.
  • run Idleon Saver a couple times

Desktop:

  • OS: Windows 10

LOGS

Failed exporting to IdleonCompanion

Describe the problem
Fails to export save for idleoncompanion

To Reproduce
Steps to reproduce the behavior, for example:

  1. Export save like normal
  2. Click "export to idleoncompanion" button
  3. Error appears consistently

Expected behavior
export file to be created

Log file
Please attach your log file, found at %APPDATA%\IdleonSaver\idleon_saver.log.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Works fine on my desktop, but this issue appears when grabbing the save from my laptop
logs.zip
idleon_save.zip

KeyError: 'demonP' card

Describe the problem
A clear and concise description of what the bug is.
I hit Export to Idleon Companion several times and I keep getting Oops! Something went wrong.

Log files
Please attach your logs.zip file, found at %APPDATA%\IdleonSaver\logs.zip.
logs.zip

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: [e.g. Windows 10]
    Windows 10 Pro 21H2

Additional context
Add any other context about the problem here.
I don't have a cat at home :(

Your data is either not formatted correctly or outdated.

Problem
Attempting to import idleon_save.json fails on Idleon Companion with an error stating that your data is not formatted correctly or outdated. Clicking on export to idleon companion within IdleonSaver also errors out.

To Reproduce

  1. Open Idleon.
  2. Select a character and collect afk gains.
  3. Switch character and go to character screen.
  4. Exit.
  5. Run Idleon Saver.
  6. Specify Location of Idleon.
  7. idleon_save.json is created.
  8. Press Export to receive error.

Expected behavior
Import into Idleon Companion with idleon_save.json or exported through the button selection within IdleonSaver

Log file
log_21-11-01_1.txt
log_21-11-01_0.txt

Screenshots
firefox_2021-11-01_01-08-43
IdleonSaver_2021-11-01_01-12-26

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Seems like there may be something within the acquired data that is causing the NoneType stack. Please see attached idleon_save.zip
idleon_save.zip

Second save bugged

Describe the problem
I already used this tool and it wen well. The second time I used it gave me this error when i wanted to convert my data to IdleonCompanion format

To Reproduce
First ) Simply Extracting
Second ) Click on "Export to Idleon Companion

Expected behavior
Having the file converted succesfully in the right format
Log file
Please attach your log file, found at %APPDATA%\IdleonSaver\idleon_saver.log.
logs.zip
Screenshots
If applicable, add screenshots to help explain your problem.

image
The screen before the error
Desktop (please complete the following information):

  • OS: Windows 10

Additional context
image

Add any other context about the problem here.

FirebaseError: No Firebase App has been created

Describe the problem
Clicking on Export causes error

Log files
logs.zip

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Game and program are installed on D drive. Made sure both were on the same drive per instructions. Tried running as administrator and got same error.

'Cannot find context with specified id'

Describe the problem
When launching game, Idleon saver briefly flashes a transparent window ( looks like same dimensions as game), then that closes and Idleon Saver goes to error screen. please upload logs

To Reproduce
3. See logs

Expected behavior
A clear and concise description of what you expected to happen.

Log file
logs.zip

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10, 21H2

Additional context
steamlibrary is not on C:, had to manually enter game file location, it was verified via cmd

Null return value from Runtime.evaluate

[Describe] the problem
When I launch the application I follow the small tutorial and I simply specify the path of LegendsOfIdleon.exe.
I click on next, a bar appears and the game tries to launch, without any effect, It is at this moment that the error word appears.

To Reproduce
Just follow the tutorial and the error message that appears.

Log file
log_21-12-15_2.txt

Screenshots
Sans titre

Desktop (please complete the following information):

  • OS Windows 10 21H1

Display compatible game version

The compatible game version can be retrieved from idleon-data. It should probably be displayed prominently on the welcome screen so users know what to expect.

It would also be good to inform the user when an error is due to a mismatched game version, but this might not be simple since the game version isn't always in the save data (data["CustomLists"]["PatchNotesInfo"]).

KeyError: "xmasEvent3"

Using 'IdleonSaver' to save Idleon data from Steam, attempts to upload to the Idleon Companion site fail and I'm given the response in the title.

I have tried running IdleonSaver multiple times, have opened Idleon itself and played enough to try and force saves, run IdleonSaver repeatedly again, and am continuously getting that error response on the Idleon Companion site.

  • OS: WIndows 10

Log/Screenshot:

scrnshot
logs.zip

won't allow me to attach idleon_save.json (for some reason it says it's not a supported file type)

Thanks for any help!! :)

Legends Of Idleon bug

Describe the problem
A clear and concise description of what the bug is.

Log files
Please attach your logs.zip file, found at %APPDATA%\IdleonSaver\logs.zip.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Windows 10]

Additional context
Add any other context about the problem here.

Error on Export to Idleon Companion

The card_base and card_name dicts are missing definitions for new cards added in the 1.30 party dungeons update, causing Idleon Companion export to fail.

File "idleon-saver/scripts/export.py", line 113, in <dictcomp> card_names[name]: get_cardtier(name, level) KeyError: 'totem'

I am not sure what entries need added, I worked around this by changing line 98 of export.py to:

base = card_bases[name] if name in card_bases else 10

and line 113 to:

(card_names[name] if name in card_names else name): get_cardtier(name, level)

This allows for properly exporting to an idleon_companion.json file.

Oops! Something went wrong.

Describe the problem
Oops! Something went wrong after pressing done at the exe path selection. Idleon is closed and steam is running.

To Reproduce
Steps to reproduce the behavior, for example:

  1. Open IdleonSaver.exe
  2. Click on Next twice
  3. See error

Expected behavior
The loading bar filling up and moving to the next step.

Log file
logs.zip

Screenshots
error

Desktop (please complete the following information):

  • Windows 10

Additional context
Add any other context about the problem here.

KeyError: 'mushP' card

Describe the problem
The app doesn't let me export to idleon companion and when i try manually uploading it, it says it's not formated correctly or is outdated.

Log files
logs.zip

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Add any other context about the problem here.

Include electron_inject in logs

Currently, electron_inject's logging output is suppressed due to the way Kivy handles logging. It's essential to have that information in bug reports, so we need to figure out how to convince Kivy to let electron_inject into the log files.

Well I need help i guess

Describe the problem
Well I thought I'd try it out but when i did everything as it said i got an error so uh i dont know guess I'll try it later again

Log files
logs.zip

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Windows 10

Additional context
Add any other context about the problem here.

Export fails on characters that have never been logged in to

Exporting the json file to idleon companion, by clicking the export button in idleon saver, or uploading it on the idleon companion website do not work. Idleon saver simply says an error occurred, and idleon companion says it is either outdated or formatted incorrectly. Trying any of the suggested fixes on IdleonSaver's github page do not work. I am using the latest version on windows 10.

Log file
log_21-12-20_5.txt

Export fails on empty StarSign

I'm continously getting the "Oops! Something went wrong" error, and it told me to report it here - I glanced at someone else's issue, saw that it was mentioned that they may have an empty stat list, realized I hadn't created the (current) final character yet so I tried that as well, but no dice. Attached is the zip folder with all the logs, as well as the JSON - which won't load into the companion either
IdleonSaverBugReport.zip

idleon_companion.json normal storage chests used doesn't import

Describe the problem
A clear and concise description of what the bug is.

Expected behavior
when I import to idleon companion the storage chests (1-13,15-21, dank) should be shown as used

Log file
Please attach your log file, found at %APPDATA%\IdleonSaver\idleon_saver.log.
log_22-01-28_4.txt

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
In my save file I have
"InvStorageUsed": { "0": "3", "1": "3", "2": "3", "3": "3", "4": "3", "5": "4", "6": "4", "7": "4", "8": "4", "9": "5", "10": "5", "11": "5", "12": "5", "13": "6", "15": "6", "16": "6", "17": "6", "18": "6", "19": "7", "20": "7", "30": "6", "31": "6", "32": "6", "33": "6", "34": "6", "35": "6", "36": "6", "37": "6", "100": "3" },
but in the companion json I only have this in the checklist chest section:
"Storage Chest 90": true, "Storage Chest 91": true, "Storage Chest 92": true, "Storage Chest 93": true, "Storage Chest 94": true, "Storage Chest 95": true, "Storage Chest 96": true, "Storage Chest 97": true,
I'm guessing it's a problem with the wiki_data, the key pair I have observed is:
"0": "3"= Storage Chest 1, "1": "3"= Storage Chest 2, "2": "3"= Storage Chest 3, "3": "3"= Storage Chest 4, "4": "3"= Storage Chest 5, "5": "4"= Storage Chest 6, "6": "4"= Storage Chest 7, "7": "4"= Storage Chest 8, "8": "4"= Storage Chest 9, "9": "5"= Storage Chest 10, "10": "5"= Storage Chest 11, "11": "5"= Storage Chest 12, "12": "5"= Storage Chest 13, "13": "6"= Storage Chest 15, "15": "6"= Storage Chest 16, "16": "6"= Storage Chest 17, "17": "6"= Storage Chest 18, "18": "6"= Storage Chest 19, "19": "7"= Storage Chest 20, "20": "7"= Storage Chest 21, "30": "6"= Storage Chest 90, "31": "6"= Storage Chest 91, "32": "6"= Storage Chest 92, "33": "6"= Storage Chest 93, "34": "6"= Storage Chest 94, "35": "6"= Storage Chest 95, "36": "6"= Storage Chest 96, "37": "6"= Storage Chest 97, "100": "3"= Dank Paypay Chest

Export to Companion failed

Describe the problem
Clicking Export to Companion results in the "Ooops! Something went wrong."

Log files

logs.zip

Screenshots
image

Desktop (please complete the following information):

  • OS: Win 10

Additional context

export to companion error

Describe the problem
when clicking the button to export to companion the oops page appears

Log files
logs.zip

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
when i try to import the json file by using show files, copy/paste file to website, an error occurs regarding parsing.

bug report

Describe the problem
A clear and concise description of what the bug is.

Log files
Please attach your logs.zip
logs.zip
file, found at %APPDATA%\IdleonSaver\logs.zip.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10 (cracked)

Additional context
Add any other context about the problem here.

KeyError: 'w4c2' card

Describe the problem
A clear and concise description of what the bug is.
Initial export is fine, however, the export for IdleOn Companion results in error.

Log files
Please attach your logs.zip file, found at %APPDATA%\IdleonSaver\logs.zip.
logs.zip

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):
Windows 10

Additional context
Add any other context about the problem here.

Cannot convert exported data to idleon companion format

Describe the problem
After reading the data from the Steam version of the game, I tried to export it to Idleon Companion format. I get an error "Oops! Something went wrong."

Log file
Please attach your log file, found at %APPDATA%\IdleonSaver\idleon_saver.log.

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Add any other context about the problem here.
logs.zip

KeyError: 'w4b4' card

logs.zip
Describe the problem
error when exporting for idleon companion

Log files
Please attach your logs.zip file, found at %APPDATA%\IdleonSaver\logs.zip.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Windows 10] windows 10

Additional context
Add any other context about the problem here.

Firebase error

Describe the problem
The app never succesfully generated a json on my computer. It keeps telling me there was a firebase error. The log implies that it wasn't initialized with App.InitializeApp()

Log files
logs.zip
Content of the generated json file: {"code": "app/no-app", "customData": {"appName": "[DEFAULT]"}, "name": "FirebaseError"}

Desktop:
Windows 10 x64
i7 8700K
Nvidia GeForce RTX 2080
32Gb 3200MHz DDR4 RAM
1 Tb M.2 Samsung EVO 860

Additional Information

  • Steam was always open during testing
  • Tried running the application immediately after closing the game, after a restart of steam and after a pc restart
  • Tried running the application after a logout on the game (essentially going back to the default login interface)
  • The application seems to keep my game running and I need to restart steam to be able to open it again afterwards (game already running error)
  • Game account is based on google account

Couldn't export to Idleon Companion

Describe the problem
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior, for example:

  1. Go to '...'
  2. Click on '....'
  3. See error

Expected behavior
A clear and concise description of what you expected to happen.

Log file
Please attach your log file, found at %APPDATA%\IdleonSaver\idleon_saver.log.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. Windows 10]

Additional context
Add any other context about the problem here.

.json not exporting

Describe the problem
Export button keeps failing to work.

Log files
logs.zip

Screenshots
image
image
image

Desktop (please complete the following information):

  • OS: Windows 10

File browser capitalizes some folders incorrectly

Describe the problem
Idleon Saver reports the following: "Something went wrong. Make sure Steam is running and Idleon is closed. Make sure to have recently played a character."

To Reproduce
Steps to reproduce the behavior,
*Steam is running.
*Logged into Idleon and each character claimed items. Returned to Player Menu and exited the game.
*Loaded Idleon Saver and navigated to correct Idleon path as I have it in a custom directory. Idleon Saver is in same folder as Idleon.exe.
*Idleon Saver launches Idleon, but reports error as above.

Expected behavior
File created/outputted as expected.

Log file
Please attach your log file, found at %APPDATA%\IdleonSaver\idleon_saver.log.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Idleon and Steam are in non-default locations.
log_21-10-31_2.txt

Screenshot 2021-10-31 193955

Idleon Saver Export Failure

Describe the problem
App gives an error message when attempting Idleon Companion export.

Log files
Please attach your logs.zip file, found at %APPDATA%\IdleonSaver\logs.zip.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Add any other context about the problem here.
logs.zip

idleonsaver not working

Describe the problem
keeps saying it is not formatted correctly or out of date

To Reproduce
Steps to reproduce the behavior, for example:

  1. ran program
  2. selected export to idleon companion
  3. See error
  4. tried pasting it manually
  5. see error

Desktop (please complete the following information):

  • OS: [Windows 10]

log file
logs.zip

i have tried opening it and closing it multiple times. i collected all my items with each character. tried changing presets, collecting cogs, leveling bubbles and nothing seems to help.

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.