Skip to content

NPC Bank in settings.json keeps resetting to empty/default state #17

Description

@Jedek

I have been having an issue where, when loading SillyTavern between PC and Mobile, the npcBank JSON object in settings.json is reset to its default state. I have other extensions, but I've been testing this without any enabled except for Megumin.

I had been working on converting an existing roleplay so I added 12 NPC to the bank and then used export function so I wouldn't lose the progress. This chat file predates the usage of Megumin Suite.

So what I have right now is:

  • Megumin 9.0, where I applied settings
  • SillyTavern 1.18.0
  • PC FireFox 153.0 (64-bit)
  • Android Chrome 150.0.7871.128

The first time I noticed issues was when I loaded this chat on my mobile phone. The NPC bank was empty. I would import, from mobile, the export I made previously, and the NPC would show up again. If I would then reload the page, the bank reset again to its empty state.

So I continued to investigate. I decided to turn off all extensions except Megumin and set up a new chat/character:

  1. Create a new Character Card and set up Megumin for this (v9 Engine, Writing Style etc.)
  2. Start a new chat with a simple message
  3. Enable the NPC bank

With this baseline, I did the following tests, all on Firefox with the latest updates:

Test 1

  1. Import NPC Bank characters
  2. Save and close Megumin panel
  3. Verify that NPC's show up in the side-panel (They were)
  4. Verify that settings.json is updated (It was)
  5. Open Megumin panel and check if NPCs are there (They are)
  6. Hard refresh the browser (ctrl+f5)
  7. Verify that NPC's show up in side-panel (It was empty)
  8. Verify that settings.json had not changed (it did, empty state)

Test 2

  1. Import NPC Bank characters
  2. Save and close Megumin panel
  3. Verify that NPC's show up in the side-panel (They were)
  4. Verify that settings.json is updated (It was)
  5. Open Megumin panel and check if NPCs are there (They are)
  6. Close the test chat in silly tavern and open an existing chat on a different character.
  7. Verify that settings.json for the test chat was not updated. (NPC bank values still present)
  8. Close the other chat and go back to the test chat.
  9. Verify that settings.json for the test chat was not updated. (NPC bank values still present)
  10. Close silly tavern tab
  11. Open new tab, navigate to silly tavern
  12. wait for it to load to the test chat
  13. Verify that NPC's show up in side-panel (It was empty)
  14. Verify that settings.json had not changed (it did, empty state)

Test 3

  1. Import NPC Bank characters
  2. Save and close Megumin panel
  3. Verify that NPC's show up in the side-panel (They were)
  4. Verify that settings.json is updated (It was)
  5. Open Megumin panel and check if NPCs are there (They are)
  6. Close the silly tavern tab on my PC browser
  7. Open Silly Tavern on Mobile
  8. Wait for it to load to the test chat
  9. Verify that NPC's show up in side-panel (It was empty)
  10. Verify that settings.json had not changed (it did, empty state)

I proceeded to test with another completely new character card and had a NPC generated, skipping the import function:

Test 4

  1. Create new Character Card
  2. Start new Chat
  3. give command to generate a new dossier for a character
  4. Verify that settings.json is appropriately populated with npcBank
  5. Retrace steps of tests 1,2,3
  6. Observe similar results.

It seems upon having SillyTavern load fully, the npcBank object is reset each time. Tests 1, 2 and 3 were done on the docker image I've been using for years. Test 4 was done GIT cloning ST 1.18.0, using the launcher to build the project, installing Megumin extension only and starting it completely fresh.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions