Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookie Monster Overriding Settings for other Mods (Easy Fix!) #1159

Open
bennett-zhang opened this issue Jun 24, 2023 · 6 comments
Open

Cookie Monster Overriding Settings for other Mods (Easy Fix!) #1159

bennett-zhang opened this issue Jun 24, 2023 · 6 comments
Labels

Comments

@bennett-zhang
Copy link

Bug description

Cookie Monster is overriding the settings of CCSE mods.

To reproduce

The steps needed to reproduce the behavior:

  1. Import the save file specified below. Note how the milk is currently Cosmic Milk.
  2. Open the console.
  3. Load CCSE: Game.LoadMod("https://klattmose.github.io/CookieClicker/CCSE.js");
  4. Note how the milk has now been reset to the default milk (in this case, Peach Milk). This is because CCSE has a separate property that controls the milk.
  5. Use the milk selector to change the milk back to Cosmic Milk.
  6. Save. (Ctrl+S) and reload the page.
  7. Load CCSE again: Game.LoadMod("https://klattmose.github.io/CookieClicker/CCSE.js");
  8. This time, because we saved previously, the milk should remain as Cosmic Milk.
  9. Now load Cookie Monster: Game.LoadMod('https://cookiemonsterteam.github.io/CookieMonster/dist/CookieMonster.js');
  10. Because of a bug, Cookie Monster will reset all of CCSE's settings.
  11. Reload without saving.
  12. Load CCSE one final time: Game.LoadMod("https://klattmose.github.io/CookieClicker/CCSE.js");
  13. Milk is now reset to default. The expected behavior is for the milk to stay as Cosmic Milk.

Solution to Fix the Bug
In saveFramework.js of CookieMonsterFramework, there is a bug with the regular expression. On line 15, you are doing a greedy replacement. The regular expression is searching for modName and the final semicolon in the entire save file. What you want instead is a lazy search for the next semicolon.

The save file looks something like this:

cookieMonsterFramework:{\"settings\":{},\"headers\":{\"infoMenu\":1,\"optionsMenu\":1},\"favouriteSettings\":[]};CCSE:{\"version\":\"2.035\",\"Achievements\":{},\"Upgrades\":{},\"Buildings\":{},\"Buffs\":{},\"Seasons\":{},\"OtherMods\":{},\"vault\":[],\"permanentUpgrades\":[-1,-1,-1,-1,-1],\"chimeType\":\"No sound\",\"milkType\":\"Cosmic milk\",\"bgType\":\"Automatic\",\"showVersionNo\":1};

Note how it contains the data for both cookieMonsterFramework and CCSE. The regular expression is incorrectly selecting the entire string, including the settings for CCSE.

The fix is simple: change the regular expression from ${modName}.*(;|$) to ${modName}.*?(;|$). The extra question mark will perform a lazy search of the string and end at the first semicolon it encounters.

Screenshot

No response

Save file

Mi4wNTJ8fDE2ODcyOTMxNDI4Mzc7MTY4NDk5NDk4OTk4NTsxNjg3NTk3ODQ3NTc5O1Bhbm9yYW1pYyBMaXphcmQ7eGhqemk7MywwLDEsMCw2LDMyLDE0fDExMDExMTAxMTAwMTAxMTAwMTExMDExMDAwMXwzLjIzNDE3OTQ2NzIwMTA5ODRlKzY5OzMuOTY3Njg2MzA4OTIxMTY2ZSs2OTsxNTUwMzsxNjcwOzMuOTY3MzAyOTI1OTM2MTM2ZSs2OTsxMDI7MjM7MTI7Ni45OTQxNzUxNDMzMjg5NjJlKzcyOzM7MTswOzA7LTE7MTA5Ozk0OzIuNjM5MzUzNzg2Mjg3Mzg5NGUrNjQ7NDQxOzE0OzE5Oy0xOzU7OzcuNDk1MzE2ODc1NzUxMDQ4ZSs2NDsxMjsxOTEyNDAwNDM3OTEzMDU4MDAwMDA7MTkxMTY1MTA1NjQ2MjQxMTUwMDAwOzc0OTM4MTQ1MDY0NjQ3NjAwOzA7MDs4NTg7ODM5Ozg2Mjs3Njc7Njk5OzI3OzE4OzIwOzI7NzU7MDswOzI0OzkwOzE2ODc1Mjk1NDc5MzM7MDswOzEyOSwyMjc7NDE7MTsxOzIuMjExNDQ0ODMwNjMyNjc0ZSs1OTs1MDsyMDAwOzEwMDA7fDEwNTksMTk0NiwxLjU5NzkyNDc1ODI4MjAzNGUrNjQsNCwsMCwxMDU5OzEwNTUsMTYwNSwyLjA2NDczODcyNjE4OTM2NjhlKzY0LDAsLDAsMTA1NTsxMDExLDI0MDgsMi44Nz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MTExMTExMTExMTExMTAxMTExMTExMTAwMTExMTExMDAxMDExMTEwMDExMTExMTAwMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTAwMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTAwMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMDAxMTExMTExMTExMTExMTExMTExMTExMTExMTExMTAxMDEwMTAwMDExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTAwMTAxMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTAxMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTAxMDExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEwMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMDAwMDExMTExMTExMTExMTExMTExMTExMTExMTExMTExMDExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTAxMTExMTExMTExMTEwMDExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTAxMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMDAxMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTAxMTExMTExMTExMTExMTExMTExMTEwMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExfDExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEwMTExMTExMTExMTExMTEwMTExMTExMTExMTAwMDAxMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTAxMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEwMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEwMDAwMDAwMDAwMDAwMDExMTAxMTExMTExMTExMTAxMTExMTExMTExMTExMTExMTExMTExMTExMTExMTEwMTExMTExMTExMTExMTExMTExMTExMTExMTExM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nNNZW51IjoxfSwiZmF2b3VyaXRlU2V0dGluZ3MiOlsiUFBPbmx5Q29uc2lkZXJCdXlhYmxlIiwiUFBSaWdpZGVsTW9kZSIsIlNvcnRCdWlsZGluZ3MiXSwidmVyc2lvbiI6IjIuMDUyLjEwIiwibG9ja2VkTWluaWdhbWVzIjpbXX07Y29va2llTW9uc3RlckZyYW1ld29yazp7InNldHRpbmdzIjp7fSwiaGVhZGVycyI6eyJpbmZvTWVudSI6MSwib3B0aW9uc01lbnUiOjF9LCJmYXZvdXJpdGVTZXR0aW5ncyI6W119Ow%3D%3D%21END%21

Browser / Steam / Version

Chrome Version 114.0.5735.133

@3plus4i
Copy link

3plus4i commented Jun 27, 2023

This is not just an issue with CCSE. I have been working on fixing my own mod over the past two weeks and had my data erased at least 4 times from 3 different save. The insidious part is that the data is gone even if I close the window immediately, before an autosave could possibly trigger.

I originally used CCSE but removed the dependency several days ago. I just lost all my data from a save I created yesterday. What makes this a really, really big issue is that my mod doesn't simply save settings, but tracks data over ascensions. With the data erased this save is useless for my purposes now.

@bennett-zhang
Copy link
Author

@3plus4i My pull request which patches this issue was recently merged into the CookieMonsterFramework repository. The changes have not yet been incorporated into the dist folder of this repository, however. I'm not entirely sure how that process works, but perhaps @DanielNoord can help you. Cheers!

@DanielNoord
Copy link
Collaborator

We only need to bump the version number here:

"@cookiemonsterteam/cookiemonsterframework": "0.2.3"

@bennett-zhang Could I ask you to do this? And run npm build-dev and npm build-final so the final src builds?

@3plus4i
Copy link

3plus4i commented Jun 30, 2023

I also took precautions now, by making a backup of the stored data on init. Doesn't bring back lost data but I should be more resilient now, in case of another issue. It still puzzles me how the bug could affect the data in local storage, when no save should have triggered.

@bennett-zhang
Copy link
Author

@DanielNoord Hi! I tried to run npm install, but I'm getting the following error:

GET https://npm.pkg.github.com/@cookiemonsterteam%2fcookiemonsterframework - unauthenticated: User cannot be authenticated with the token provided.

@DanielNoord
Copy link
Collaborator

I guess you need to authenticate with npm?
https://github.com/orgs/community/discussions/40791

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants