Skip to content
This repository was archived by the owner on May 27, 2026. It is now read-only.

Migration (for future use)

Prolix OCs edited this page Aug 14, 2025 · 3 revisions

Migration Tools

The Silly Sim Tracker extension includes tools to help you convert older data formats to the newer, improved structure.

Why Migration?

Early versions of the extension used a different JSON structure that mixed world data with character data. The newer format separates these concerns, making it cleaner and more maintainable.

Old Format (Legacy)

{
  "current_date": "2025-08-10",
  "current_time": "14:30",
  "Alice": {
    "hp": 75,
    "mp": 50
  }
}

New Format (Modern)

{
  "worldData": {
    "current_date": "2025-08-10",
    "current_time": "14:30"
  },
  "characters": [
    {
      "name": "Alice",
      "hp": 75,
      "mp": 50
    }
  ]
}

Migration Methods

1. Settings Panel Button

Location: Silly Sim Tracker settings Action: Click "Migrate to New Format" Scope: Converts all messages in the current chat Safety: Includes confirmation dialog

Steps:

  1. Open SST settings
  2. Find "JSON Format Migration" section
  3. Click "Migrate to New Format"
  4. Confirm when prompted
  5. Wait for conversion to complete
  6. Check notifications for results

2. Slash Command

Command: /sst-convert Scope: Converts all messages in the current chat Safety: Includes confirmation dialog

Steps:

  1. Type /sst-convert in any chat input
  2. Confirm when prompted
  3. Wait for conversion to complete
  4. Check notifications for results

How Migration Works

Smart Detection

The migration tools are intelligent and won't re-process data that's already in the new format.

Data Preservation

All your existing data is preserved during migration - nothing is lost.

Format Conversion

  • World data fields (current_date, current_time) move to worldData object
  • Character data moves from object keys to characters array
  • Character names become explicit name fields

Example Conversion

Before:

{
  "current_date": "2025-08-10",
  "current_time": "14:30",
  "Alice": {
    "hp": 75,
    "mp": 50
  },
  "Bob": {
    "hp": 100,
    "mp": 30
  }
}

After:

{
  "worldData": {
    "current_date": "2025-08-10",
    "current_time": "14:30"
  },
  "characters": [
    {
      "name": "Alice",
      "hp": 75,
      "mp": 50
    },
    {
      "name": "Bob",
      "hp": 100,
      "mp": 30
    }
  ]
}

When to Migrate

Good Times to Migrate

  • When starting a new campaign (fresh start)
  • When experiencing data organization issues
  • When wanting to use newer extension features
  • When collaborating with others (new format is clearer)

You Don't Have To Migrate

  • Legacy format still works perfectly
  • No functionality is lost with old format
  • Migrate only when you want the benefits

Safety Features

Confirmation Prompts

Both migration methods include confirmation dialogs to prevent accidental conversion.

Non-Destructive

Migration updates messages in place but doesn't delete the originals - you can always see the change.

Smart Skipping

Already migrated data is automatically skipped, preventing double-conversion.

Error Handling

If any message fails to migrate, the process continues with others and reports the error.

Troubleshooting Migration

Migration Fails

  1. Check that JSON data is valid
  2. Ensure messages contain sim codeblocks
  3. Look for error messages in notifications
  4. Check browser console for details

Partial Migration

If some messages migrate but others don't:

  1. Check the failed messages for JSON errors
  2. Verify they contain sim data
  3. Try migrating individual messages by editing them

Undo Migration

There's no direct undo, but you can:

  1. Use version control if you have it
  2. Manually edit messages back to old format
  3. Keep backups of important chats

Best Practices

Before Migration

  • Backup important chats if you're concerned
  • Check that your JSON data is valid
  • Ensure you understand the new format

After Migration

  • Verify that cards still display correctly
  • Test that new data generation works
  • Update any system prompts that reference format

For Collaboration

  • Coordinate with collaborators about format choice
  • Consider migrating when starting shared campaigns
  • Document which format you're using

The migration tools make it easy to upgrade to the cleaner, more maintainable data structure while preserving all your existing tracking data.

Clone this wiki locally